From 2d1675c181182e4bb579c25e4ca341cf7e486196 Mon Sep 17 00:00:00 2001 From: pathmapper Date: Mon, 29 Oct 2018 17:35:12 +0100 Subject: [PATCH] Fixes for code review comments --- src/components/App.jsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/App.jsx b/src/components/App.jsx index 7e9a986..b6685db 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -147,13 +147,14 @@ export default class App extends React.Component { }) const styleUrl = initialStyleUrl() - if(styleUrl) { - if(window.confirm("Load style from URL and discard current changes?")) { - this.styleStore = new StyleStore() - loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle)) - } + if(styleUrl && window.confirm("Load style from URL: " + styleUrl + " and discard current changes?")) { + this.styleStore = new StyleStore() + loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle)) removeStyleQuerystring() } else { + if(styleUrl) { + removeStyleQuerystring() + } this.styleStore.init(err => { if(err) { console.log('Falling back to local storage for storing styles')