Skip to content

Commit

Permalink
πŸ› Fix localize context element (#36760)
Browse files Browse the repository at this point in the history
Otherwise we'd fail to show that we failed copying to clipboard.
  • Loading branch information
alanorozco committed Nov 4, 2021
1 parent 2d5d9a2 commit d287103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/amp-story/1.0/amp-story-share.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ function buildProvider(doc, shareType, opt_params) {
height={48}
class="i-amphtml-story-share-icon"
type={shareType}
// TODO(alanorozco): Remove this exception, and loop to `setAttributes`.
// eslint-disable-next-line local/preact
{...buildProviderParams(opt_params)}
>
<span class="i-amphtml-story-share-label">
Expand Down Expand Up @@ -241,7 +243,7 @@ export class ShareWidget {

if (!copyTextToClipboard(this.win, url)) {
const failureString = localize(
this.storyEl_,
this.storyEl,
LocalizedStringId.AMP_STORY_SHARING_CLIPBOARD_FAILURE_TEXT
);
Toast.show(this.storyEl, dev().assertString(failureString));
Expand Down

0 comments on commit d287103

Please sign in to comment.