Skip to content

Commit

Permalink
custom key is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenquimby authored and thomasmichaelwallace committed Oct 16, 2023
1 parent 8d7b390 commit ba3e4f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ServerlessBetterCredentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class ServerlessBetterCredentials implements Plugin {
}

async init() {
if (!evaluateBoolean(this.serverless.service.custom.betterCredentials?.enabled, true)) {
if (!evaluateBoolean(this.serverless.service.custom?.betterCredentials?.enabled, true)) {
log.debug('serverless-better-credentials: plugin is disabled - skipping');
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type BetterCredentialsPluginOptions = {

export type ServerlessWithCustom = Serverless & {
service: {
custom: {
custom?: {
betterCredentials?: BetterCredentialsPluginOptions;
}
}
Expand Down

0 comments on commit ba3e4f8

Please sign in to comment.