Comparing version 1.0.9 to 1.0.10
@@ -70,5 +70,15 @@ const fetch = require('node-fetch'); | ||
data.forEach((element, index) => { | ||
if(this.models.includes(element)){ | ||
results.push(element); | ||
return; | ||
if(element.constructor === Object){ | ||
if(this.models.includes(element)){ | ||
results.push(element); | ||
return; | ||
} | ||
} else if(element.constructor === String){ | ||
element = { | ||
meta: { | ||
id: element | ||
} | ||
}; | ||
} else { | ||
return; | ||
} | ||
@@ -75,0 +85,0 @@ let found = this.find(element, options); |
{ | ||
"name": "wapp-api", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "Helper functions to speed up wapp development process.", | ||
@@ -5,0 +5,0 @@ "main": "wappsto/index.js", |
@@ -106,3 +106,3 @@ const WebSocket = require('./stream-polyfill'); | ||
if(typeof window === 'object' && window.document && window.WebSocket){ | ||
if(!(typeof window === 'object') || !(window.document && window.WebSocket)){ | ||
// Add ping timeout | ||
@@ -109,0 +109,0 @@ refreshPingTimer(); |
Sorry, the diff of this file is too big to display
378132
10751