mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
[CORL-678] Transition to eslint (#2634)
* chore: setup eslint * chore: tslint checks with types & check for import order * chore: complete eslint transition * fix: tests * fix: linting after rebase, faster lint for lint-staged * chore: remove line * fix: lint rules * feat: add a11y linter and fix errors * fix: tests
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* getCurrentScriptOrigin will try to find the script origin.
|
||||
* For legacy browsers a fallbackIdentifier is required.
|
||||
*
|
||||
* @argument fallbackID id attached to a script tag to get its origin from for legacy browsrs.
|
||||
* @param fallbackID id attached to a script tag to get its origin from for legacy browsrs.
|
||||
*/
|
||||
function getCurrentScriptOrigin(fallbackID?: string) {
|
||||
// Find current script (modern browsers).
|
||||
@@ -13,9 +13,7 @@ function getCurrentScriptOrigin(fallbackID?: string) {
|
||||
script = document.getElementById(fallbackID) as HTMLScriptElement | null;
|
||||
if (!script) {
|
||||
// Find script tag with `fallbackIdentifier` as its className.
|
||||
script = document.querySelector(
|
||||
`.${fallbackID}`
|
||||
) as HTMLScriptElement | null;
|
||||
script = document.querySelector(`.${fallbackID}`);
|
||||
}
|
||||
}
|
||||
if (!script) {
|
||||
|
||||
Reference in New Issue
Block a user