diff --git a/src/serve_rendered.js b/src/serve_rendered.js index ad53359..beacf67 100644 --- a/src/serve_rendered.js +++ b/src/serve_rendered.js @@ -162,7 +162,7 @@ const extractPathsFromQuery = (query, transformer) => { providedPath.includes('enc:') && PATH_PATTERN.test(decodeURIComponent(providedPath)) ) { - // +4 because enc: are 4 characters, everything after enc: is considered to be part of the polyline + // +4 because 'enc:' is 4 characters, everything after 'enc:' is considered to be part of the polyline const encIndex = providedPath.indexOf('enc:') + 4; const coords = polyline .decode(providedPath.substring(encIndex)) diff --git a/test/static.js b/test/static.js index 885543c..302becb 100644 --- a/test/static.js +++ b/test/static.js @@ -174,13 +174,13 @@ describe('Static endpoints', function () { describe('encoded path', function () { testStatic( - prefix, - 'auto/20x20', - 'png', - 200, - 2, - /image\/png/, - '?path='+decodeURIComponent('enc:{{biGwvyGoUi@s_A|{@'), + prefix, + 'auto/20x20', + 'png', + 200, + 2, + /image\/png/, + '?path=' + decodeURIComponent('enc:{{biGwvyGoUi@s_A|{@'), ); }); });