Skip to content

Commit d48fad8

Browse files
authored
Merge pull request #1 from chetstone/chetstone-patch-1
Fix AltManagerMixin.js to use displayName
2 parents 1fb7c6f + 5f494b3 commit d48fad8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: AltManagerMixin.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ var AltManagerMixin = {
6464
throw new ReferenceError('registerAction has not been is defined')
6565
}
6666

67-
var storeName = Store.name
68-
var actionName = Action.name
67+
var storeName = Store.displayName || Store.name
68+
var actionName = Action.displayName || Action.name
6969

7070
this.action = props.alt.getActions(actionName)
7171
this.store = props.alt.getStore(storeName)
7272

7373
if (!this.action) {
7474
props.alt.addActions(actionName, Action)
7575
this.action = props.alt.getActions(actionName)
76-
this.store = props.alt.createStore(Store, null, props.alt)
76+
this.store = props.alt.createStore(Store, storeName, props.alt)
7777
if (this.onNewAlt) {
7878
this.onNewAlt(this.store.getState(), props)
7979
}

0 commit comments

Comments
 (0)