Skip to content

Commit b6f85a6

Browse files
fixed lint issues (#28)
2 parents b5a0634 + f1d2bf3 commit b6f85a6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/editor/DOMEventHandlers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ export class DOMEventHandlers {
3535
// }
3636
if (DOMEventHandlers.instance) {
3737
try {
38-
DOMEventHandlers.instance.destroy();
38+
DOMEventHandlers.instance.destroy()
3939
} catch (e) {
40-
console.warn("Cleaning up old editor instance");
40+
console.warn('Cleaning up old editor instance')
4141
}
4242
}
4343
DOMEventHandlers.instance = new Editor(container, data, options)
4444
DOMEventHandlers.instance.command.executeSetLocale('en')
4545
DOMEventHandlers.instance.register.langMap('en', en)
4646

47-
return DOMEventHandlers.instance;
47+
return DOMEventHandlers.instance
4848
}
4949

5050
static handleUndo() {

src/editor/core/draw/Draw.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class Draw {
143143
private intersectionPageNo: number
144144
private lazyRenderIntersectionObserver: IntersectionObserver | null
145145

146-
private isDestroyed: boolean = false;
146+
private isDestroyed = false
147147

148148
constructor(
149149
rootContainer: HTMLElement,
@@ -359,7 +359,7 @@ export class Draw {
359359
}
360360

361361
public setIntersectionPageNo(payload: number) {
362-
if (this.isDestroyed) return;
362+
if (this.isDestroyed) return
363363
this.intersectionPageNo = payload
364364
if (this.listener.intersectionPageNoChange) {
365365
this.listener.intersectionPageNoChange(this.intersectionPageNo)
@@ -1719,7 +1719,7 @@ export class Draw {
17191719
}
17201720

17211721
public render(payload?: IDrawOption) {
1722-
if (this.isDestroyed) return;
1722+
if (this.isDestroyed) return
17231723
const { header, footer } = this.options
17241724
const {
17251725
isSubmitHistory = true,
@@ -1853,7 +1853,7 @@ export class Draw {
18531853
}
18541854

18551855
public destroy() {
1856-
this.isDestroyed = true;
1856+
this.isDestroyed = true
18571857
this.container.remove()
18581858
this.globalEvent.removeEvent()
18591859
this.scrollObserver.removeEvent()

src/editor/core/range/RangeManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export class RangeManager {
318318
}
319319

320320
public setRangeStyle() {
321-
if (!this.eventBus || !this.listener) return;
321+
if (!this.eventBus || !this.listener) return
322322
const rangeStyleChangeListener = this.listener.rangeStyleChange
323323
const isSubscribeRangeStyleChange =
324324
this.eventBus.isSubscribe('rangeStyleChange')

0 commit comments

Comments
 (0)