Skip to content
Permalink
Browse files

fix(syntagme): use function.prototype.bind

* fix fail test
  • Loading branch information...
rymizuki committed Sep 15, 2017
1 parent 11ced48 commit 2a43e164dd99943b25ca825d44c1bdc2a8f80416
Showing with 3 additions and 7 deletions.
  1. +1 −3 dist/syntagme.js
  2. +1 −1 dist/syntagme.min.js
  3. +1 −3 src/syntagme/index.js
@@ -118,9 +118,7 @@ var Syntagme = function () {
_createClass(Syntagme, [{
key: 'connect',
value: function connect() {
this.dispatcher.register(function () {
this.store.handle.apply(this.store, arguments);
});
this.dispatcher.register(this.store.handle.bind(this.store));
this.connected_fg = true;
}
}, {

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -29,9 +29,7 @@ class Syntagme {
this.connect()
}
connect () {
this.dispatcher.register(function () {
this.store.handle.apply(this.store, arguments)
})
this.dispatcher.register(this.store.handle.bind(this.store))
this.connected_fg = true
}
subscribe(subscriber: Subscriber) {

0 comments on commit 2a43e16

Please sign in to comment.
You can’t perform that action at this time.