Comparing version 0.2.9 to 0.3.0
{ | ||
"name": "brink", | ||
"version": "0.2.9", | ||
"version": "0.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./src/brink/brink.js", |
@@ -11,4 +11,5 @@ 'use strict'; | ||
/*jshint ignore : start */ | ||
IS_NODE = typeof exports !== 'undefined' && this.exports !== exports; | ||
IS_NODE = typeof module !== 'undefined' && module.exports; | ||
IS_BROWSER = !IS_NODE; | ||
/*jshint ignore : end */ | ||
@@ -210,2 +211,2 @@ | ||
module.exports = $b; | ||
} | ||
} |
@@ -242,2 +242,6 @@ $b( | ||
if (isNew && self.store) { | ||
self.store.add(self); | ||
} | ||
return this.adapter.saveRecord(this).then(function (json) { | ||
@@ -247,6 +251,2 @@ self.deserialize(json); | ||
set(self, 'isLoaded', true); | ||
if (isNew && self.store) { | ||
self.store.add(self); | ||
} | ||
}); | ||
@@ -253,0 +253,0 @@ }, |
@@ -57,4 +57,6 @@ $b( | ||
set(record, 'store', this); | ||
collection.push(record); | ||
if (!~collection.indexOf(record)) { | ||
set(record, 'store', this); | ||
collection.push(record); | ||
} | ||
} | ||
@@ -172,2 +174,4 @@ | ||
var record; | ||
record = this.modelFor(mKey).create(data); | ||
@@ -276,2 +280,2 @@ this.add(mKey, record); | ||
).attach('$b'); | ||
).attach('$b'); |
@@ -13,3 +13,3 @@ (function () { | ||
IS_NODE = typeof exports !== 'undefined' && this.exports !== exports; | ||
IS_NODE = typeof module !== 'undefined' && module.exports; | ||
@@ -16,0 +16,0 @@ _global = IS_NODE ? global : window; |
964949
154
20766