From 95bb404ef587ea51b69fd4fd61684f7d79701984 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 18 Mar 2022 21:19:34 +0300 Subject: Cleanup all JS linter errors --- src/main/assets/embed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/assets/embed.js') diff --git a/src/main/assets/embed.js b/src/main/assets/embed.js index 739b95f3..0022ae82 100644 --- a/src/main/assets/embed.js +++ b/src/main/assets/embed.js @@ -255,10 +255,10 @@ function getEmbeddableLinkTypes() { div.innerHTML = `
`; - if (window.twttr) { + if (window['twttr']) { // this will only happen if you embed another set of twitter posts after the twitter script loads (likely never) // https://developer.twitter.com/en/docs/twitter-for-websites/javascript-api/guides/scripting-loading-and-initialization - window.twttr.widgets.load(div); + window['twttr'].widgets.load(div); } else if (!document.head.querySelector ('[src="https://platform.twitter.com/widgets.js\"]')) { // innerHTML cannot insert scripts, so... let script = document.createElement('script'); -- cgit v1.2.3