Skip to content

Commit

Permalink
added Object.defineProperty to connect.js:73, fixed this context in l…
Browse files Browse the repository at this point in the history
…ocalstorage-cache.js:405
  • Loading branch information
Austin Sanders authored and Austin Sanders committed Jul 3, 2018
1 parent c6939d3 commit 8d8cda2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ connect.behavior = function(name, behavior){
var behaviorMixin = function(base){
// basically Object.create
var Behavior = function(){};
Behavior.name = name;
Object.defineProperty(Behavior, "name", {
value: name
});
Behavior.prototype = base;
var newBehavior = new Behavior();
// allows behaviors to be a simple object, not always a function
Expand Down
2 changes: 1 addition & 1 deletion data/localstorage-cache/localstorage-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ module.exports = connect.behavior("data/localstorage-cache",function(baseConnect
// Get the data for the old set we can union with.
return this.getListData(setDatum.set).then(function(setData){
// update the old set to the new set
self.updateSet(setDatum, canSet.getUnion(setDatum.set, set, getItems(setData), items, this.algebra), union);
self.updateSet(setDatum, canSet.getUnion(setDatum.set, set, getItems(setData), items, self.algebra), union);
});
}
}
Expand Down
1 change: 1 addition & 0 deletions data/localstorage-cache/localstorage-cache_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ QUnit.asyncTest("pagination loses the bigger set (#126)", function(){
QUnit.start();
});
}).catch(function(e){
console.log(e);
QUnit.ok(false, "something broke");
QUnit.start();
});
Expand Down

0 comments on commit 8d8cda2

Please sign in to comment.