@node-projects/web-component-designer 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161,9 +161,12 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
161
161
  }
162
162
  /* --- start IUiCommandHandler --- */
163
163
  async executeCommand(command) {
164
- let handeled = this.serviceContainer.modelCommandService.executeCommand(this, command);
165
- if (handeled != null)
166
- return;
164
+ const modelCommandService = this.serviceContainer.modelCommandService;
165
+ if (modelCommandService) {
166
+ let handeled = modelCommandService.executeCommand(this, command);
167
+ if (handeled != null)
168
+ return;
169
+ }
167
170
  switch (command.type) {
168
171
  case CommandType.screenshot:
169
172
  {
@@ -212,9 +215,12 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
212
215
  }
213
216
  }
214
217
  canExecuteCommand(command) {
215
- let handeled = this.serviceContainer.modelCommandService.canExecuteCommand(this, command);
216
- if (handeled !== null)
217
- return handeled;
218
+ const modelCommandService = this.serviceContainer.modelCommandService;
219
+ if (modelCommandService) {
220
+ let handeled = modelCommandService.canExecuteCommand(this, command);
221
+ if (handeled !== null)
222
+ return handeled;
223
+ }
218
224
  if (command.type === CommandType.undo) {
219
225
  return this.instanceServiceContainer.undoService.canUndo();
220
226
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A UI designer for Polymer apps",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.0.43",
4
+ "version": "0.0.44",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "",