From 516ca63b252fea6148805fe86c73fb4af4beb62f Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Fri, 4 May 2018 11:46:41 +0200 Subject: [PATCH] Use ES5 in examples/inject_ol_cesium.js --- examples/inject_ol_cesium.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/inject_ol_cesium.js b/examples/inject_ol_cesium.js index 803a488ab..61360c3da 100644 --- a/examples/inject_ol_cesium.js +++ b/examples/inject_ol_cesium.js @@ -1,12 +1,17 @@ +// This file is ES5 on purpose. +// It does not go through webpack; it is directly loaded by the html. (function() { - const mode = window.location.href.match(/mode=([a-z0-9\-]+)\&?/i); - const isDev = mode && mode[1] === 'dev'; + /* eslint-disable no-var */ + var mode = window.location.href.match(/mode=([a-z0-9\-]+)\&?/i); + var isDev = mode && mode[1] === 'dev'; window.IS_DEV = isDev; - const cs = isDev ? 'CesiumUnminified/Cesium.js' : 'Cesium/Cesium.js'; + var cs = isDev ? 'CesiumUnminified/Cesium.js' : 'Cesium/Cesium.js'; window.CESIUM_URL = `../node_modules/@camptocamp/cesium/Build/${cs}`; if (!window.LAZY_CESIUM) { document.write(``); } + + /* eslint-enable no-var */ })();