Skip to content

Commit

Permalink
Calculate key before src variable is overwritten
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lucasnetau authored Jul 5, 2023
1 parent fedb19b commit 2e6ada0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e6ada0

Please sign in to comment.