-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Don't timeout if the completion variable is already set #287
Conversation
Codecov Report
@@ Coverage Diff @@
## master #287 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 145 145
Branches 20 20
=========================================
Hits 145 145
Continue to review full report at Codecov.
|
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.
Thank you for your contribution! 🎉
Please add a unit test to verify this new behavior and answer my question.
src/CompletionTriggers/Variable.ts
Outdated
@@ -29,10 +29,15 @@ export class Variable extends CompletionTrigger { | |||
awaitPromise: true, | |||
expression: ` | |||
new Promise((resolve, reject) => { | |||
Object.defineProperty(window, '${varName}', { | |||
if (window[${JSON.stringify(varName)}] === true) { |
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.
What advantages are there to using ${JSON.stringify(varName)}
over ${varName}
?
@Congelli501 have you had a chance to review my comments? |
I made my desired changes. Thank you for your contribution! 🎉 |
No description provided.