Merge pull request #4997 from sbwalker/dev

reload the script if data-reload is "always" or if the script has not been loaded previously and data-reload is "once" or "true"
This commit is contained in:
Shaun Walker 2025-01-16 15:06:36 -05:00 committed by GitHub
commit f8737c112e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,9 +12,9 @@ export function onUpdate() {
let key = getKey(script);
if (enhancedNavigation) {
// reload the script if data-reload is always or if the script has not been loaded previously and data-reload is once
// reload the script if data-reload is "always" or if the script has not been loaded previously and data-reload is "once" or "true"
let dataReload = script.getAttribute('data-reload');
if ((dataReload === 'true' || dataReload === 'always') || (!scriptKeys.has(key) && dataReload == 'once')) {
if (dataReload === 'always' || (!scriptKeys.has(key) && (dataReload == 'once' || dataReload === 'true'))) {
reloadScript(script);
}
}