Fix delete file bug

This commit is contained in:
LordMathis 2019-12-08 16:44:55 +01:00
parent 7e19e86349
commit c124cc842d
No known key found for this signature in database
GPG Key ID: 575849FD91CE470C
2 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ import helmet from 'helmet'
import expressStaticGzip from 'express-static-gzip' import expressStaticGzip from 'express-static-gzip'
import path from 'path' import path from 'path'
import morgan from 'morgan' import morgan from 'morgan'
import chokidar from 'chokidar'
import jsonfile from 'jsonfile' import jsonfile from 'jsonfile'
import { ServerRenderer } from './utils/serverRender' import { ServerRenderer } from './utils/serverRender'
import { Scanner } from './utils/scanner' import { Scanner } from './utils/scanner'

View File

@ -81,7 +81,7 @@ export class DataHolder {
} }
deleteFile (filepath) { deleteFile (filepath) {
this.data.posts = this.dataHolder.data.posts.filter((post) => this.data.posts = this.data.posts.filter((post) =>
post.filename !== filepath post.filename !== filepath
) )
} }