Skip to content

Commit 131d295

Browse files
committed
fix lint
1 parent a4e79d1 commit 131d295

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/plugins/processor/post.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { toDate, timezone, isExcludedFile, isTmpFile, isHiddenFile, isMatch } from './common';
22
import Promise from 'bluebird';
33
import { parse as yfm } from 'hexo-front-matter';
4-
import { extname, join } from 'path';
4+
import { extname, join, posix } from 'path';
55
import { stat, listDir } from 'hexo-fs';
66
import { slugize, Pattern, Permalink } from 'hexo-util';
77
import { magenta } from 'picocolors';
8-
import { posix } from 'path';
98
import type { _File } from '../../box';
109
import type Hexo from '../../hexo';
1110
import type { Stats } from 'fs';
@@ -280,8 +279,8 @@ function processAsset(ctx: Hexo, file: _File) {
280279
}
281280

282281
if (Post.length > 0) {
283-
const assetDir = id.slice(0, id.lastIndexOf("/"));
284-
const post = Post.findOne(p => p.asset_dir.endsWith(posix.join(assetDir, "/")));
282+
const assetDir = id.slice(0, id.lastIndexOf('/'));
283+
const post = Post.findOne(p => p.asset_dir.endsWith(posix.join(assetDir, '/')));
285284
if (post != null && (post.published || ctx._showDrafts())) {
286285
return PostAsset.save({
287286
_id: id,

0 commit comments

Comments
 (0)