Browse Source

revert required

em-data-variables
mohamed yahia 1 year ago
parent
commit
3d8f38b8bc
  1. 4
      packages/core/src/data_sources/model/DataVariable.ts

4
packages/core/src/data_sources/model/DataVariable.ts

@ -5,7 +5,7 @@ import { stringToPath } from '../../utils/mixins';
export const DataVariableType = 'data-variable';
export default class DataVariable extends Model {
em: EditorModel;
em?: EditorModel;
defaults() {
return {
@ -40,7 +40,7 @@ export default class DataVariable extends Model {
if (!this.em) {
throw new Error('EditorModel instance is not provided for a data variable.');
}
const val = this.em.DataSources.getValue(path, defaultValue);
const val = this.em?.DataSources.getValue(path, defaultValue);
return val;
}

Loading…
Cancel
Save