-
Notifications
You must be signed in to change notification settings - Fork 865
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(tray): 🩹 Fixes the context loaded async in the tray. #2593
Conversation
Signed-off-by: Nishant Arora <[email protected]>
@@ -33,7 +33,7 @@ | |||
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ | |||
"types": ["node", "./types/countly-sdk-nodejs"], /* Specify type package names to be included without being referenced in a source file. */ | |||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ | |||
// "resolveJsonModule": true, /* Enable importing .json files */ | |||
"resolveJsonModule": true, /* Enable importing .json files */ |
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.
this was a simple fix to require('../../package.json')
errors.
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.
i've got some changes local.. just gonna test now
src/tray.js
Outdated
click: () => { runGarbageCollector(ctx) }, | ||
enabled: false | ||
}, | ||
{ type: 'separator' }, | ||
{ | ||
id: 'moveRepositoryLocation', | ||
label: i18n.t('moveRepositoryLocation'), | ||
click: () => { moveRepositoryLocation() } | ||
// @ts-ignore | ||
click: () => { moveRepositoryLocation(ctx) } |
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.
This won't work because ctx is different now (need to use ctx.get('getIpfsd')
). We should be able to use getCtx()
in runGarbageCollector
and moveRepositoryLocation
, or simply pass the ctx methods required.
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.
oh, my bad, it seemed to work but mostly would've been buggy. I wonder what's a good way to test this 🤔
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.
@whizzzkid take a peek at these new changes when you get a chance, and then let's merge and release when you're good with it
Fixes: #2577
In this PR:
v0.30.1
TODO: Move this to better type-definitions to not run into this.