Skip to content

Commit b4d2326

Browse files
Fixed error report on invalid type
1 parent b5cb6f1 commit b4d2326

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

framework/default/ortoo-core/default/lwc/confirmationDialog/confirmationDialog.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ export default class ConfirmationDialog extends LightningElement {
3535
};
3636
set type( value ) {
3737
if ( ! type.hasOwnProperty( value ) ) {
38-
throw 'Invalid type specified, should be one of ' + type;
38+
let typeList = [];
39+
for ( let thisType in type ) {
40+
typeList.push( type[ thisType ] );
41+
}
42+
throw 'Invalid type specified, should be one of ' + typeList.join( ', ' );
3943
}
4044
this._type = value;
4145
}

0 commit comments

Comments
 (0)