Skip to content

Commit

Permalink
Remove "throw Error" since they cause other components to fail silently
Browse files Browse the repository at this point in the history
  • Loading branch information
protozoo committed Oct 2, 2024
1 parent 7730672 commit 973d3b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/vueplotly.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
let boundAttribute = plotlyInstance.getAttribute(":"+attributeName); // Expected to be a valid js object (binding)
// Both versions of attribute can't coexist
if( literalAttribute != null && boundAttribute != null ){
throw new Error("Both bound and literal attribute found for " + attributeName + ". Only one is allowed.");
console.error("Both bound and literal attribute found for " + attributeName + ". Only one is allowed.");
}
// We don't need to do anything if there's a bound attribute (starting with ":", as it is assumed to be a valid JS object)
if( boundAttribute != null ){
Expand All @@ -41,7 +41,7 @@
plotlyInstance.setAttribute(":"+attributeName, literalAttribute); // Replace the original base64 data with the JS string
plotlyInstance.removeAttribute(attributeName); // Remove the original base64 attribute
}else{
throw new Error("Invalid literal attribute for " + attributeName + ". Expected a base64-encoded JSON string, or a valid JS object.");
console.error("Invalid literal attribute for " + attributeName + ". Expected a base64-encoded JSON string, or a valid JS object.");
}
}
}
Expand Down

0 comments on commit 973d3b8

Please sign in to comment.