on xenial help sign in
Use a better is not a number checker
cda93c6Albert Astals Cid
plugins/Dash/CardCreator.js+1−1
@@ -482,7 +482,7 @@ function cardString(template, components) {
482 }
482 }
483
483
484 var aspectRatio = components["art"] && components["art"]["aspect-ratio"] || 1;
484 var aspectRatio = components["art"] && components["art"]["aspect-ratio"] || 1;
485− if (typeof aspectRatio !== "number") {
485+ if (isNaN(aspectRatio)) {
486 aspectRatio = 1;
486 aspectRatio = 1;
487 }
487 }
488 var fallback = components["art"] && components["art"]["fallback"] || "";
488 var fallback = components["art"] && components["art"]["fallback"] || "";