Pārlūkot izejas kodu

Update circle.js

Lutz Roeder 2 gadi atpakaļ
vecāks
revīzija
422880e82d
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      source/circle.js

+ 4 - 4
source/circle.js

@@ -408,7 +408,7 @@ circle.Attribute = class {
         this._name = name;
         this._value = ArrayBuffer.isView(value) ? Array.from(value) : value;
         this._type = metadata && metadata.type ? metadata.type : null;
-        if (this._name == 'fused_activation_function') {
+        if (this._name === 'fused_activation_function') {
             this._visible = false;
         }
         if (this._type) {
@@ -417,12 +417,12 @@ circle.Attribute = class {
         if (metadata) {
             if (metadata.visible === false) {
                 this._visible = false;
-            } else if (Object.prototype.hasOwnProperty.call(metadata, 'default')) {
+            } else if (metadata.default !== undefined) {
                 value = this._value;
-                if (typeof value == 'function') {
+                if (typeof value === 'function') {
                     value = value();
                 }
-                if (value == metadata.default) {
+                if (value === metadata.default) {
                     this._visible = false;
                 }
             }