Fix delete file bug
This commit is contained in:
parent
7e19e86349
commit
c124cc842d
|
@ -3,7 +3,6 @@ import helmet from 'helmet'
|
|||
import expressStaticGzip from 'express-static-gzip'
|
||||
import path from 'path'
|
||||
import morgan from 'morgan'
|
||||
import chokidar from 'chokidar'
|
||||
import jsonfile from 'jsonfile'
|
||||
import { ServerRenderer } from './utils/serverRender'
|
||||
import { Scanner } from './utils/scanner'
|
||||
|
|
|
@ -81,7 +81,7 @@ export class DataHolder {
|
|||
}
|
||||
|
||||
deleteFile (filepath) {
|
||||
this.data.posts = this.dataHolder.data.posts.filter((post) =>
|
||||
this.data.posts = this.data.posts.filter((post) =>
|
||||
post.filename !== filepath
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue