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

Do not install extensions twice in multidoc #33084

Merged
merged 1 commit into from Mar 5, 2021

Conversation

dvoytenko
Copy link
Contributor

Partial for #33001.

For some reason, the multidoc is installing extensions twice. In reality they only install once since the extension service checks whether or not an extension has been installed. But there's no reason to do it twice. More importantly, the first call is more precise because it includes the correct version.

The first call is inside the mergeHead_:

this.extensions_.installExtensionForDoc(
ampdoc,
extensionId,
urlParts.extensionVersion
);

The second call is done right after the mergeHead_:

this.extensions_.installExtensionsInDoc(ampdoc, extensionIds);

@dvoytenko dvoytenko merged commit 3406bf2 into ampproject:master Mar 5, 2021
@dvoytenko dvoytenko deleted the bento/ext-version-multidoc branch March 5, 2021 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants