-
Notifications
You must be signed in to change notification settings - Fork 3
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: getUploader
should only be called when a new UploadPicker
instance is created
#887
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, I actually don't get why that would change anything ?
The uploader init is irrelevant to the Vue component. It doesn't matter if it's created before or while the vue component is initiated?
@skjnldsv because before this the bundled file looks like this: const uploadManager = getUploader();
var UploadPicker = // ...
// ... more stuff ...
let _uploader = null
function getUploader() {
/// ...
} So as With this changes it looks like this var UploadPicker = {
// ...
data() {
uploadManager: getUploader(),
// ...
}
}
// ... more stuff ...
let _uploader = null
function getUploader() {
/// ...
} so this time everything is declared first before it is used. To see the error in action you can try this exampel in Node or your browser console: const uploadManager = getUploader()
let _uploader = null
function getUploader() {
if (_uploader === null) return _uploader = 'uploader'
return _uploader
} The node error message is not that helpful I think:
But on Firefox it makes sense:
|
…stance is created Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
ff74861
to
d00589a
Compare
Found the reason for the cypress issue here and fixed that :) |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #887 +/- ##
=======================================
Coverage 33.50% 33.50%
=======================================
Files 6 6
Lines 200 200
Branches 31 31
=======================================
Hits 67 67
Misses 131 131
Partials 2 2 ☔ View full report in Codecov by Sentry. |
Wow, this is very interesting! |
Finally solved the issue with the
@nextcloud/cypress
update: