mirror of
https://github.com/maputnik/editor.git
synced 2026-07-30 09:47:28 +00:00
Fixes for code review comments
This commit is contained in:
@@ -147,13 +147,14 @@ export default class App extends React.Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const styleUrl = initialStyleUrl()
|
const styleUrl = initialStyleUrl()
|
||||||
if(styleUrl) {
|
if(styleUrl && window.confirm("Load style from URL: " + styleUrl + " and discard current changes?")) {
|
||||||
if(window.confirm("Load style from URL and discard current changes?")) {
|
this.styleStore = new StyleStore()
|
||||||
this.styleStore = new StyleStore()
|
loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle))
|
||||||
loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle))
|
|
||||||
}
|
|
||||||
removeStyleQuerystring()
|
removeStyleQuerystring()
|
||||||
} else {
|
} else {
|
||||||
|
if(styleUrl) {
|
||||||
|
removeStyleQuerystring()
|
||||||
|
}
|
||||||
this.styleStore.init(err => {
|
this.styleStore.init(err => {
|
||||||
if(err) {
|
if(err) {
|
||||||
console.log('Falling back to local storage for storing styles')
|
console.log('Falling back to local storage for storing styles')
|
||||||
|
|||||||
Reference in New Issue
Block a user