From 2e6ada0cb10d508513e8629c0275b144c9dc575f Mon Sep 17 00:00:00 2001 From: James Lucas Date: Wed, 5 Jul 2023 13:24:11 +1000 Subject: [PATCH] Calculate key before src variable is overwritten src is overwritten and make a string prior to calculating the key. If no id is set in src.id then the key is calculated as undefined --- src/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/utils.js b/src/js/utils.js index 37ec08f81..2869dfd80 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -495,8 +495,8 @@ export const getStyles = (scriptScr, path) => { if (typeof src == 'object') { type = src.type || (src.style ? 'inline' : 'href') id = src.id - src = type == 'inline' ? src.style : src.href key = id || src.href || src.style + src = type == 'inline' ? src.style : src.href } // check we haven't already loaded this css