(mock-api/file-manager) Fixed: http params are not working properly because of the new string conversion

This commit is contained in:
Sercan Yemen 2022-05-12 23:18:10 +03:00
parent f5cc14939c
commit 9786c6baf5

View File

@ -38,8 +38,8 @@ export class FileManagerMockApi
// Clone the items
let items = cloneDeep(this._items);
// See if a folder id exist
const folderId = request.params.get('folderId') ?? null;
// See if the folder id exist
const folderId = request.params.get('folderId') === 'null' ? null : request.params.get('folderId');
// Filter the items by folder id. If folder id is null,
// that means we want to root items which have folder id