Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin committed Apr 18, 2024
1 parent a4e79d1 commit 131d295
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/plugins/processor/post.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { toDate, timezone, isExcludedFile, isTmpFile, isHiddenFile, isMatch } from './common';
import Promise from 'bluebird';
import { parse as yfm } from 'hexo-front-matter';
import { extname, join } from 'path';
import { extname, join, posix } from 'path';
import { stat, listDir } from 'hexo-fs';
import { slugize, Pattern, Permalink } from 'hexo-util';
import { magenta } from 'picocolors';
import { posix } from 'path';
import type { _File } from '../../box';
import type Hexo from '../../hexo';
import type { Stats } from 'fs';
Expand Down Expand Up @@ -280,8 +279,8 @@ function processAsset(ctx: Hexo, file: _File) {
}

if (Post.length > 0) {
const assetDir = id.slice(0, id.lastIndexOf("/"));
const post = Post.findOne(p => p.asset_dir.endsWith(posix.join(assetDir, "/")));
const assetDir = id.slice(0, id.lastIndexOf('/'));
const post = Post.findOne(p => p.asset_dir.endsWith(posix.join(assetDir, '/')));
if (post != null && (post.published || ctx._showDrafts())) {
return PostAsset.save({
_id: id,
Expand Down

0 comments on commit 131d295

Please sign in to comment.