Web Inspector: Don't throw exceptions in WebInspector.Color
[WebKit-https.git] / Source / WebCore / inspector / front-end / Spectrum.js
index bfeadb51775f1b064bc8b2aeed7bfbecb0bd21b2..0f34968a51835f7c16a3656e35d95d74902f8bba 100644 (file)
@@ -281,7 +281,7 @@ WebInspector.Spectrum.prototype = {
         var colorValue = color.toString(this.outputColorFormat);
         if (!colorValue)
             colorValue = color.toString(); // this.outputColorFormat can be invalid for current color (e.g. "nickname").
-        return new WebInspector.Color(colorValue);
+        return WebInspector.Color.parse(colorValue);
     },
 
     get outputColorFormat()