From 3588ebd979431a09afc8787756f1363a8050f0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Tue, 11 Dec 2018 00:16:02 +0100 Subject: [PATCH] make js linter even happier --- src/c3nav/editor/static/editor/js/editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 91d6289a..290c180a 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -371,6 +371,7 @@ editor = { editor._source_image_layer.remove(); editor._source_image_layer = null; } + // noinspection HtmlRequiredAltAttribute $('').on('load', editor._source_name_selected_ajax_callback); $('#sidebar form').removeClass('show-source-wizard'); $('body').removeClass('map-enabled'); @@ -532,7 +533,7 @@ editor = { if (!confirm('Are you sure you want to copy settings from '+value.name+'?')) return; delete value.name; for (key in value) { - content.find('[name='+key+']').val(value[key]); + if (value.hasOwnProperty(key)) content.find('[name='+key+']').val(value[key]); } editor._source_image_calculate_scale(); editor._source_image_repositioned();