Skip to content

Commit

Permalink
SOF-7449: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Feb 9, 2025
1 parent a6e2bea commit bb2ad14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions dist/js/context/mixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,10 @@ function MaterialsContextMixin(superclass) {
function MethodDataContextMixin(superclass) {
return class extends superclass {
constructor(...params) {
var _a;
super(...params);
const config = params[0];
this._methodData = (config.context && config.context.methodData) || {};
this.isEdited = (_a = config.isEdited) !== null && _a !== void 0 ? _a : false;
this.isEdited = Boolean(config.isEdited);
}
/* @summary Replace the logic in constructor with this in order to enable passing `methodDataHash` between
* subsequent initializations of the derived class. Not used at present and kept for the record.
Expand Down
2 changes: 1 addition & 1 deletion src/js/context/mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export function MethodDataContextMixin<T extends Constructor>(superclass: T) {
const config = params[0];

this._methodData = (config.context && config.context.methodData) || {};
this.isEdited = config.isEdited ?? false;
this.isEdited = Boolean(config.isEdited);
}

/* @summary Replace the logic in constructor with this in order to enable passing `methodDataHash` between
Expand Down

0 comments on commit bb2ad14

Please sign in to comment.