Gojs bug or I miss something

I’m using latest GoJS 1.7.3 version of library. To prevent users to have ability to copy, cut, paste in diagram I used this
in diagram declaration:

"commandHandler.canCopySelection": false,
"commandHandler.canCutSelection": false,
"commandHandler.canPasteSelection": false,

and copy, cut, paste was disabled. Now I changed this to

"commandHandler.canCopySelection": false,
"commandHandler.canCutSelection": true,
"commandHandler.canPasteSelection": true,

and now I got error when use CMD+C or CXM+X like this

Error message: Uncaught TypeError: this.canCopySelection is not a function
URL: http://localhost:63342/MP-BlockDesigner/lib/go.js
Line Number: 437

What is wrong here?

Obviously I found somewhere this bad code and while it worked for disabling (at least it won’t throw error) it was totally wrong.

Solved it this way :)

"commandHandler.canCopySelection": function () {
                    return false;
                },
                "commandHandler.canCutSelection": function () {
                    return true;
                },
                "commandHandler.canPasteSelection": function () {
                    return true;
                },

Yes, you figured out what was wrong with what you first tried.

However, you might find it easier to just set various properties on the Diagram, such as Diagram.allowClipboard and Diagram.allowCopy. GoJS User Permissions -- Northwoods Software