Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
some lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mderrier committed Dec 9, 2020
1 parent 6131782 commit 2378385
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/editor/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function performWithFeedback(
selector = selector.replace(/-\w/g, (m) =>
m[1].toUpperCase()
) as SelectorPrivate;

return mathfield.executeCommand(selector);
}

Expand Down
1 change: 0 additions & 1 deletion src/editor/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { defaultAnnounceHook } from './a11y';
import { INLINE_SHORTCUTS } from './shortcuts-definitions';
import { DEFAULT_KEYBINDINGS } from './keybindings-definitions';


const NO_OP_LISTENER = (): void => {
return;
};
Expand Down
13 changes: 10 additions & 3 deletions src/public/mathfield-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ declare global {
['keystroke']: CustomEvent<KeystrokeEvent>;
['focus-out']: CustomEvent<FocusOutEvent>;
}
}
}

const MATHFIELD_TEMPLATE = document.createElement('template');
MATHFIELD_TEMPLATE.innerHTML = `<style>
Expand Down Expand Up @@ -370,7 +370,10 @@ export class MathfieldElement extends HTMLElement implements Mathfield {
super();

if ((window as any).ShadyCSS) {
(window as any).ShadyCSS.prepareTemplate(MATHFIELD_TEMPLATE, 'host');
(window as any).ShadyCSS.prepareTemplate(
MATHFIELD_TEMPLATE,
'host'
);
}
this.attachShadow({ mode: 'open' });

Expand Down Expand Up @@ -1155,7 +1158,11 @@ declare global {
MathfieldElement: typeof MathfieldElement;
}
}
if (typeof window != 'undefined' && window.customElements && !window.MathfieldElement) {
if (
typeof window != 'undefined' &&
window.customElements &&
!window.MathfieldElement
) {
if (!window.customElements.get('math-field')) {
window.MathfieldElement = MathfieldElement;
window.customElements.define('math-field', MathfieldElement);
Expand Down

0 comments on commit 2378385

Please sign in to comment.