You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Document.currentScript property returns the <script> element whose script is currently being processed and isn't a JavaScript module. (For modules use import.meta instead.)
I did a quick test here and just checking if it's null first works for me because my application is loading resources from / which is the fallback for the method.
const match = ((document.currentScript && document.currentScript.src) || "").match(/(.*\/)/);
Ideally the application should ignore this piece of logic when passing the logo properties to the component (I see this is only used to resolve the fallback assets for the logo)
The text was updated successfully, but these errors were encountered:
Looks like a reasonable addition. Issue will be reported to https://asu.edu/webservices. I'm closing this issue since we don't handle our issues in Github. :)
Hello, I'm using vite for the development of the new EPO application and I'm facing an issue while using Unity Header component in this line.
asu-unity-stack/packages/components-core/src/core/utils/script-utils.js
Line 5 in ec31e83
It happens because vite uses "module" to transpile/import the scripts in the browser and for that reason
document.currentScript
is nullhttps://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript
I did a quick test here and just checking if it's null first works for me because my application is loading resources from
/
which is the fallback for the method.Ideally the application should ignore this piece of logic when passing the logo properties to the component (I see this is only used to resolve the fallback assets for the logo)
The text was updated successfully, but these errors were encountered: