Skip to content

Commit

Permalink
fix: backwards compatibility with serverless < 3 (#170)
Browse files Browse the repository at this point in the history
fixes #165
  • Loading branch information
mikejpeters authored Apr 25, 2023
1 parent 15bd652 commit c8c6953
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const uploadDirectory = require('./upload');
const validateClient = require('./validate');

class Client {
constructor(serverless, cliOptions, { log }) {
constructor(serverless, cliOptions, { log } = {}) {
this.error = serverless.classes.Error;
this.log = log;
this.log = log || serverless.cli.log.bind(serverless.cli);
this.serverless = serverless;
this.options = serverless.service.custom.client;
this.cliOptions = cliOptions || {};
Expand Down Expand Up @@ -70,7 +70,7 @@ class Client {

this.hooks = {
'client:client': () => {
log(this.commands.client.usage);
this.log(this.commands.client.usage);
},
'client:deploy:deploy': () => {
return this._processDeployment();
Expand Down

0 comments on commit c8c6953

Please sign in to comment.