Skip to content

Commit

Permalink
Fixes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
bchr02 committed Apr 16, 2017
1 parent bd453b6 commit 0a1c9ad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ function Filejson(cfg) {

return Reflect.get(target, key, receiver);
},
deleteProperty: function(target, property) {
// The default behavior to delete the value
Reflect.deleteProperty(target, property);

if( !self.paused ) {
self.save(function(error) {
if(error) {
console.error(error);
return;
}
});
}

// The deleteProperty method must return a Boolean indicating whether or not the property has been successfully deleted.
return true;
},
set: function(target, key, value, receiver) {
var check = function(value, tree) {
var t = typeof value;
Expand Down

0 comments on commit 0a1c9ad

Please sign in to comment.