diff --git a/src/components/App.jsx b/src/components/App.jsx index 6fc5ce9..e2d34c9 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -258,6 +258,10 @@ export default class App extends React.Component { this.revisionStore.addRevision(newStyle) if(save) this.saveStyle(newStyle) + this.setState({ + mapStyle: style.replaceAccessTokens(newStyle, {allowFallback: true}), + }) + this.fetchSources() this.setState({ mapStyle: newStyle, errors: [], @@ -266,9 +270,9 @@ export default class App extends React.Component { this.setState({ errors: errors.map(err => err.message) }) + this.fetchSources() } - this.fetchSources(); } onUndo = () => {