Use a better is not a number checker
commitcda93c68ef6aa1a3e31072b6f85f6bf4a28eeee2
authorAlbert Astals Cid <albert.astals@canonical.com>
dateWed 10 Feb 2016, 17:52 (11 years ago)
parent2e81799
plugins/Dash/CardCreator.js+1−1
@@ -482,7 +482,7 @@ function cardString(template, components) {
482482 }
483483
484484 var aspectRatio = components["art"] && components["art"]["aspect-ratio"] || 1;
485− if (typeof aspectRatio !== "number") {
485+ if (isNaN(aspectRatio)) {
486486 aspectRatio = 1;
487487 }
488488 var fallback = components["art"] && components["art"]["fallback"] || "";