Fix action

This commit is contained in:
Peter Maquiran
2021-08-09 13:56:17 +01:00
parent 08c5a959d5
commit 8da233c1bc
14 changed files with 58 additions and 60 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ import { SHA1 } from 'crypto-js'
export class PublicationListService {
// main data
private _document: Publication[] = []
private _document = {}
// local storage keyName
private keyName: string;
@@ -18,8 +18,8 @@ export class PublicationListService {
this.keyName = (SHA1(this.constructor.name+ 'view-publication-list/local')).toString()
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, [])
this._document = restore.document
let restore = localstoreService.get(this.keyName, {})
this._document = restore.document || {}
}, 10)
}
@@ -28,7 +28,7 @@ export class PublicationListService {
return this._document
}
getDocument(folderId: string) {
getDocument(folderId) {
return this._document[folderId]
}