@bee.js/node 0.0.88 → 0.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/beehive.js +4 -2
  2. package/package.json +1 -1
package/beehive.js CHANGED
@@ -253,9 +253,11 @@ module.exports = function hive(req = {}, res = {}, model = null) {
253
253
  },
254
254
 
255
255
  whereIf: function (condition, where, binds) {
256
- if (condition) script[0]["where"].push(where);
256
+ if (!condition) return;
257
257
 
258
- if (condition && binds)
258
+ script[0]["where"].push(typeof where == "function" ? where() : where);
259
+
260
+ if (binds)
259
261
  script[0]["binds"].push(typeof binds === "function" ? binds() : binds);
260
262
 
261
263
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bee.js/node",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "description": "A JavaScript framework for making Node.js API´s",
5
5
  "main": "index.js",
6
6
  "scripts": {