Skip to content

Commit

Permalink
Fixed error report on invalid type
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-baillie-ortoo committed Dec 13, 2021
1 parent b5cb6f1 commit b4d2326
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export default class ConfirmationDialog extends LightningElement {
};
set type( value ) {
if ( ! type.hasOwnProperty( value ) ) {
throw 'Invalid type specified, should be one of ' + type;
let typeList = [];
for ( let thisType in type ) {
typeList.push( type[ thisType ] );
}
throw 'Invalid type specified, should be one of ' + typeList.join( ', ' );
}
this._type = value;
}
Expand Down

0 comments on commit b4d2326

Please sign in to comment.