Skip to content

Commit 363548a

Browse files
committed
Fix eslint errors & warnings
1 parent 039df8c commit 363548a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/core/render/embed.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ function walkFetchEmbed({ embedTokens, compile, fetch }, cb) {
3838

3939
// This may contain YAML front matter and will need to be stripped.
4040
const frontMatterInstalled =
41-
(((global || window || {}).$docsify || {}).frontMatter || {}).installed || false;
41+
(((global || window || {}).$docsify || {}).frontMatter || {})
42+
.installed || false;
4243
if (frontMatterInstalled === true) {
4344
text = $docsify.frontMatter.parseMarkdown(text);
4445
}

src/core/router/history/abstract.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { noop } from '../../util/core';
21
import { inBrowser } from '../../util/env';
32
import { on } from '../../util/dom';
43
import { parseQuery } from '../util';
@@ -12,8 +11,8 @@ export class AbstractHistory extends History {
1211
this.mode = this.config.routerMode;
1312
}
1413

15-
onchange(cb = noop) {
16-
if(inBrowser) {
14+
onchange() {
15+
if (inBrowser) {
1716
on('hashchange', e => {
1817
let hash = e.target.location.hash;
1918
let parsed = this.parse(hash);
@@ -25,7 +24,7 @@ export class AbstractHistory extends History {
2524
}
2625

2726
parse(path = '') {
28-
if(this.mode === 'history') {
27+
if (this.mode === 'history') {
2928
let query = '';
3029

3130
const queryIndex = path.indexOf('?');
@@ -45,8 +44,8 @@ export class AbstractHistory extends History {
4544
}
4645

4746
toURL(path, params, currentRoute = '') {
48-
return this.mode === 'history' ?
49-
HTML5History.prototype.toURL.bind(this)(path, params, currentRoute) :
50-
HashHistory.prototype.toURL.bind(this)(path, params, currentRoute);
47+
return this.mode === 'history'
48+
? HTML5History.prototype.toURL.bind(this)(path, params, currentRoute)
49+
: HashHistory.prototype.toURL.bind(this)(path, params, currentRoute);
5150
}
5251
}

0 commit comments

Comments
 (0)