summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/db/model.js5
-rw-r--r--lib/vendor/Loader.js9
2 files changed, 3 insertions, 11 deletions
diff --git a/lib/db/model.js b/lib/db/model.js
index f174656..1f729f6 100644
--- a/lib/db/model.js
+++ b/lib/db/model.js
@@ -108,7 +108,6 @@ module.exports = function modelScope(type, db_model, _props) {
create: (data) => {
return new Promise( (resolve, reject) => {
crud.create( model.sanitize(data) ).then( (data) => {
- console.log('yooooooo')
resolve(data.toJSON())
props.afterCreate && props.afterCreate(data)
}).catch( (e) => {
@@ -140,16 +139,12 @@ module.exports = function modelScope(type, db_model, _props) {
sanitize: (data) => {
var valid = {}
- console.log('yooooooo')
Object.keys(data).forEach(key => {
- console.log('yooooooo2', key)
if (props.hasOne[key]) {
return
}
- console.log('yooooooo3')
valid[key] = data[key]
})
- console.log('yooooooo4')
console.log(valid)
return valid
},
diff --git a/lib/vendor/Loader.js b/lib/vendor/Loader.js
index 2668267..ad42b17 100644
--- a/lib/vendor/Loader.js
+++ b/lib/vendor/Loader.js
@@ -41,12 +41,9 @@ module.exports = (function(){
// (boolean) Is the loader ready?
Loader.prototype.isReady = function(){
- for (var s in this.assets) {
- if (this.assets.hasOwnProperty(s) && this.assets[s] != true) {
- return false;
- }
- }
- return true;
+ return ! Object.keys(this.assets).some( (key) => {
+ return ! this.assets[key]
+ })
}
// (float) Percentage of assets remaining