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

fix: Do not rely on OC.webroots or OC.appwebroots but use own logic #560

Merged
merged 1 commit into from Jan 24, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jan 24, 2024

Prevent any issues when called before OC.webroots is defined due to use of this package in OC/index.js.

This is basically copy-paste from OC/webroots.js

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux added bug Something isn't working 3. to review labels Jan 24, 2024
@skjnldsv skjnldsv merged commit d98ae33 into master Jan 24, 2024
7 checks passed
@susnux susnux deleted the fix/do-not-rely-on-global-state branch January 24, 2024 17:04
@blizzz
Copy link

blizzz commented Jan 25, 2024

does it need the 28 backport?

– ok, i understand not, 👍

@nickvergessen
Copy link
Contributor

Done in nextcloud/server#43091

@max-nextcloud
Copy link

This broke a bunch of the tests in text as we were stubbing OC.webroots and now need to stub _oc_webroots.

@susnux
Copy link
Contributor Author

susnux commented Jan 31, 2024

This broke a bunch of the tests in text as we were stubbing OC.webroots and now need to stub _oc_webroots.

If you are using @nextcloud/router then probably better mock getRoot instead of private internal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants