From fd2ffacb7cf32f7cbc96d0e79a20351b236e0109 Mon Sep 17 00:00:00 2001 From: Andrew Calcutt Date: Sun, 15 Oct 2023 01:06:52 -0400 Subject: [PATCH] fix: move hash to front of identifier Signed-off-by: Andrew Calcutt --- src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.js b/src/server.js index 71c7c4f..96bcac8 100644 --- a/src/server.js +++ b/src/server.js @@ -212,7 +212,7 @@ function start(opts) { StyleSourceId; if (isValidHttpUrl(StyleSourceId)) { id = - id.replace(/^.*\/(.*)$/, '$1') + '_' + fnv1a(StyleSourceId); + fnv1a(StyleSourceId) + '_' + id.replace(/^.*\/(.*)$/, '$1'); } while (data[id]) id += '_'; //if the data source id already exists, add a "_" untill it doesn't //Add the new data source to the data array.