Skip to content

Commit a2cb91c

Browse files
committed
Support for react-native
1 parent 175cbf9 commit a2cb91c

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

dist/alt-browser-with-addons.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,11 @@ var AltStore = (function () {
10961096
getState: {
10971097
value: function getState() {
10981098
// Copy over state so it's RO.
1099-
return assign({}, this[STATE_CONTAINER]);
1099+
var state = this[STATE_CONTAINER];
1100+
return Object.keys(state).reduce(function (obj, key) {
1101+
obj[key] = state[key];
1102+
return obj;
1103+
}, {});
11001104
}
11011105
}
11021106
});

dist/alt-browser.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,11 @@ var AltStore = (function () {
844844
getState: {
845845
value: function getState() {
846846
// Copy over state so it's RO.
847-
return assign({}, this[STATE_CONTAINER]);
847+
var state = this[STATE_CONTAINER];
848+
return Object.keys(state).reduce(function (obj, key) {
849+
obj[key] = state[key];
850+
return obj;
851+
}, {});
848852
}
849853
}
850854
});

dist/alt-with-runtime.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ var AltStore = (function () {
101101
getState: {
102102
value: function getState() {
103103
// Copy over state so it's RO.
104-
return assign({}, this[STATE_CONTAINER]);
104+
var state = this[STATE_CONTAINER];
105+
return Object.keys(state).reduce(function (obj, key) {
106+
obj[key] = state[key];
107+
return obj;
108+
}, {});
105109
}
106110
}
107111
});

dist/alt.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ var AltStore = (function () {
113113
getState: {
114114
value: function getState() {
115115
// Copy over state so it's RO.
116-
return assign({}, this[STATE_CONTAINER]);
116+
var state = this[STATE_CONTAINER];
117+
return Object.keys(state).reduce(function (obj, key) {
118+
obj[key] = state[key];
119+
return obj;
120+
}, {});
117121
}
118122
}
119123
});

src/alt.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ class AltStore {
9090

9191
getState() {
9292
// Copy over state so it's RO.
93-
return assign({}, this[STATE_CONTAINER])
93+
const state = this[STATE_CONTAINER]
94+
return Object.keys(state).reduce((obj, key) => {
95+
obj[key] = state[key]
96+
return obj
97+
}, {})
9498
}
9599
}
96100

0 commit comments

Comments
 (0)