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 LGTM errors in extensions/ #12770
Conversation
/to @zhouyx |
@@ -167,7 +167,7 @@ export class RequestHandler { | |||
} else { | |||
preUrl = appendEncodedParamStringToUrl(preUrl, extraUrlParamsStr); | |||
} | |||
return baseUrlTemplatePromise.then(preUrl => { | |||
return baseUrlTemplatePromise.then(() => { |
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.
Bug! These are not equivalent!
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.
That's right, I believe this is a bug in the original code. The then()
block should use the local variable preUrl
and not a new argument with the same name. Adding @zhouyx, who introduced this in #11837:
See https://github.com/ampproject/amphtml/pull/11837/files#diff-b951eee683ce1cc97c5e22f9abd32f11R169
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.
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.
Thanks. File reverted.
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.
@jridgewell @zhouyx PTAL
Fixes the following LGTM errors:
Partial fix for #12597