|
|
|
@ -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; |
|
|
|
} |
|
|
|
|