From 8c3482a5621af6442a84fb58ab3dfd44a22fa059 Mon Sep 17 00:00:00 2001 From: alexandercerutti Date: Tue, 11 Sep 2018 22:09:37 +0200 Subject: [PATCH] Fixed adding of locations and beacons only if array has at least 1 element --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 851596c..7dbf61a 100644 --- a/index.js +++ b/index.js @@ -248,7 +248,7 @@ class Pass { } let valid = data.filter(d => schema.isValid(d, type+"Dict")); - this.props[type] = valid; + this.props[type] = valid.length ? valid : undefined; return Object.assign({ length: valid.length