Browse Source

Fix documentation (#10323)

David Brochart 3 years ago
parent
commit
f8b9f27cbb
1 changed files with 3 additions and 3 deletions
  1. 3 3
      docs/source/extension/extension_points.rst

+ 3 - 3
docs/source/extension/extension_points.rst

@@ -146,12 +146,12 @@ Here is a sample block of code that adds a command to the application (given by
 .. code:: typescript
 
     const commandID = 'my-command';
-    const toggled = false;
+    let toggled = false;
 
     app.commands.addCommand(commandID, {
       label: 'My Cool Command',
-      isEnabled: true,
-      isVisible: true,
+      isEnabled: () => true,
+      isVisible: () => true,
       isToggled: () => toggled,
       iconClass: 'some-css-icon-class',
       execute: () => {