diff --git a/src/BlazorWorker/BlazorWorker.js b/src/BlazorWorker/BlazorWorker.js index c7951f5..c8ea413 100644 --- a/src/BlazorWorker/BlazorWorker.js +++ b/src/BlazorWorker/BlazorWorker.js @@ -209,7 +209,13 @@ window.BlazorWorker = function () { const empty = {}; // Import module script from a path relative to approot - self.importLocalScripts = async (urls) => { + self.importLocalScripts = async (...urls) => { + if (urls === undefined || urls === null) { + return; + } + if (!urls.map) { + urls = [urls] + } const mappedUrls = urls.map(url => initConf.appRoot + (url.startsWith('/') ? '' : '/') + url); for (const url of mappedUrls) { await import(url);