summaryrefslogtreecommitdiff
path: root/iridescence/src/models/product.js
diff options
context:
space:
mode:
Diffstat (limited to 'iridescence/src/models/product.js')
-rw-r--r--iridescence/src/models/product.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/iridescence/src/models/product.js b/iridescence/src/models/product.js
index c408b79..ded5434 100644
--- a/iridescence/src/models/product.js
+++ b/iridescence/src/models/product.js
@@ -4,8 +4,8 @@ export default class Product {
this.id = json.id ? json.id : null;
this.name = json.name ? json.name : null;
this.description = json.description ? json.description : null;
- this.cents = json.cents ? json.cents : null;
- this.quantity = json.quantity ? json.quantity : null;
+ this.cents = Number.isFinite(json.cents) ? json.cents : null;
+ this.quantity = Number.isFinite(json.quantity) ? json.quantity : null;
this.featured = json.featured ? json.featured : false;
this.category = json.category ? json.category : null;
this.photo_base = json.photo_base ? json.photo_base : null;