fix BrowserStore bug in actionOnItemsWithPrefix and refactor BrowserStore

Этот коммит содержится в:
ralder
2015-07-09 03:32:03 -07:00
родитель 5bb2acc996
Коммит 6a559febc2
11 изменённых файлов: 153 добавлений и 313 удалений

Просмотреть файл

@@ -596,19 +596,14 @@ PasswordPage = React.createClass({
module.exports = React.createClass({
updateParent: function(state, skipSet) {
BrowserStore.setGlobalItem(this.props.hash, JSON.stringify(state));
BrowserStore.setGlobalItem(this.props.hash, state);
if (!skipSet) {
this.setState(state);
}
},
getInitialState: function() {
var props = null;
try {
props = JSON.parse(BrowserStore.getGlobalItem(this.props.hash));
}
catch(parse_error) {
}
var props = BrowserStore.getGlobalItem(this.props.hash);
if (!props) {
props = {};
@@ -628,7 +623,7 @@ module.exports = React.createClass({
props.data = this.props.data;
}
return props ;
return props;
},
render: function() {
if (this.state.wizard == "welcome") {