Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
FloGou committed Jul 21, 2016
1 parent eff78e0 commit 98db69f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function ActiveRecord(model, name) {
* In any of those cases, it is safe to override existing. Otherwise, do nothing
*/
if (Array.isArray(options[key])) {
if (!_this.key || !_this[key][0] || typeof _this[key][0] === 'string' || typeof options[key][0] === 'object') {
if (!_this[key] || !_this[key][0] || typeof _this[key][0] === 'string' || typeof options[key][0] === 'object') {
_this[key] = dao.build(_.clone(options[key]));
}
} else if (!_this[key] || typeof _this[key] === 'string' || typeof options[key] === 'object') {
Expand Down
2 changes: 1 addition & 1 deletion dest/temp/ActiveRecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function ActiveRecord(model, name) {
* In any of those cases, it is safe to override existing. Otherwise, do nothing
*/
if (Array.isArray(options[key])) {
if (!_this.key || !_this[key][0] || typeof _this[key][0] === 'string' || typeof options[key][0] === 'object') {
if (!_this[key] || !_this[key][0] || typeof _this[key][0] === 'string' || typeof options[key][0] === 'object') {
_this[key] = dao.build(_.clone(options[key]));
}
} else if (!_this[key] || typeof _this[key] === 'string' || typeof options[key] === 'object') {
Expand Down
1 change: 0 additions & 1 deletion dest/temp/specs/angular-dao.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ describe('Angular DAO', function () {
model.save().then(function () {
expect(model.models2[0]._id).toEqual('888');
});
// httpBackend.flush()
});

it('Should save objects', function () {
Expand Down
2 changes: 1 addition & 1 deletion src/ActiveRecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ActiveRecord(model, name){
* In any of those cases, it is safe to override existing. Otherwise, do nothing
*/
if (Array.isArray(options[key])){
if (!this.key ||
if (!this[key] ||
!this[key][0] ||
typeof(this[key][0]) === 'string' ||
typeof(options[key][0]) === 'object')
Expand Down

0 comments on commit 98db69f

Please sign in to comment.