Stroke and fill error

Hi, today all of sudden i am getting error like this

when i try to change the color of node using stroke and fill of that node. please help me in resolve this error.

What is your code doing and what is the error message?

$(go.Shape, "Rectangle", {
            fill: '#009CCC', strokeWidth: 1, stroke: '#009CCC',
            width: 6, stretch: go.GraphObject.Vertical, alignment: go.Spot.Left,
            // if a user clicks the colored portion of a node, cycle through colors
            click: function (e, obj) { 
                myDiagram.startTransaction("Update node color");  
                 var newColor = newColorSet;
                if (newColor > noteColors.length-1) newColor = 0;
                myDiagram.model.setDataProperty(obj.part.data, "stroke", newColor);
                 myDiagram.model.setDataProperty(obj.part.data, "fill", newColor);
                myDiagram.commitTransaction("Update node color");
            } 
          },
                           new go.Binding("fill", "fill", getNoteColor),
                           new go.Binding("stroke", "stroke", getNoteColor)
                                  
        ),

in the above code i am setting the color, and there is one more place where will just load the diagram fromt he JSON what i get (myDiagramDiv.model = go.Model.fromJson(JSON);) here also i am getting that error

What is getNoteColor? What is newColorSet?

Are you using the debug library? And if so, what is the error message?

I can help you faster if you provide the information I need to answer your question. Think about trying to answer your own question.

 var noteColors = ['#009CCC', '#CC293D'];
    function getNoteColor(num) {
        if(num == "1"){
            newColorSet = parseInt(color);
     }else{
         color = num;
         newColorSet = parseInt(color) + 1;
     }
     return noteColors[Math.min(num, noteColors.length - 1)];
      //return "#ff0000";
    };

$(go.Shape, "Rectangle", {
            fill: '#009CCC', strokeWidth: 1, stroke: '#009CCC',
            width: 6, stretch: go.GraphObject.Vertical, alignment: go.Spot.Left,
            // if a user clicks the colored portion of a node, cycle through colors
            click: function (e, obj) { 
                myDiagram.startTransaction("Update node color");  
                 var newColor = newColorSet;
                if (newColor > noteColors.length-1) newColor = 0;
                myDiagram.model.setDataProperty(obj.part.data, "stroke", newColor);
                 myDiagram.model.setDataProperty(obj.part.data, "fill", newColor);
                myDiagram.commitTransaction("Update node color");
            } 
          },
                           new go.Binding("fill", "fill", getNoteColor),
                           new go.Binding("stroke", "stroke", getNoteColor)
                                  
        )

above is the template to change the color of the node as in this example Kanban Board but i ahve changed the variables to change the color and not only here on load of diagram i am facing the issue .