fix: filter paginated results (#3216)

This commit is contained in:
Erez Rokah
2020-02-10 11:44:00 +02:00
committed by GitHub
parent eff1fe3131
commit 0a482b1004
3 changed files with 34 additions and 11 deletions

View File

@ -38,7 +38,16 @@ const jsToMap = (obj: {}) => {
return immutableObj;
};
const knownMetaKeys = Set(['index', 'count', 'pageSize', 'pageCount', 'usingOldPaginationAPI']);
const knownMetaKeys = Set([
'index',
'count',
'pageSize',
'pageCount',
'usingOldPaginationAPI',
'extension',
'folder',
'depth',
]);
const filterUnknownMetaKeys = (meta: Map<string, string>) =>
meta.filter((_v, k) => knownMetaKeys.has(k as string));