Skip to content

Commit

Permalink
change app/store/StampStore.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ishiduca committed Jan 24, 2015
1 parent c79ed7d commit 698565a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Binary file added app/stores/.StampStore.js.swp
Binary file not shown.
10 changes: 5 additions & 5 deletions app/stores/StampStore.js
Expand Up @@ -8,8 +8,9 @@ function Store () {
}
util.inherits(Store, events.EventEmitter)

Store.prototype.ADD_STAMP = function (value) {
Store.prototype.add_stamp = function (value) {
this.list.push(value)
this.emitChange()
return this
}

Expand All @@ -29,10 +30,9 @@ Store.prototype.getlist = function () {
var store = module.exports = new Store

Disptcher.register(function (payload) {
var actionType = payload.actionType
var actionType = payload.actionType.toLowerCase()

if (actionType === 'ADD_STAMP') {
store.ADD_STAMP(payload.value)
store.emitChange()
if (typeof store[actionType] === 'function') {
store[actionType](payload.value)
}
})

0 comments on commit 698565a

Please sign in to comment.