Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed globus javascript variable declaration #3979

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

abujeda
Copy link
Contributor

@abujeda abujeda commented Nov 25, 2024

The globus JS is failing after the files.html.erb layout was updated to load files/index.js as a module.
Loading as a module automatically actives strict mode making variable declaration compulsury.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#strict_mode_for_modules

This is a minor fix for the globus.js

Comment on lines 30 to 31
url = "https://app.globus.org/file-manager?origin_id=" + info.endpoint + "&origin_path=" + origin_path;
const url = "https://app.globus.org/file-manager?origin_id=" + info.endpoint + "&origin_path=" + origin_path;
return url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed this too and didn't get around to patching it. Can we just return the string and use string interpolation instead of addition?

return `https://app.globus.org/file-manager?origin_id=${info.endpoint}&origin_path=${origin_path}`;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure - fixed

@johrstrom johrstrom merged commit cf15e10 into OSC:master Nov 25, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants