force a prefecth

This commit is contained in:
Daniel Lugo 2020-07-30 10:11:38 -04:00
parent 2573a2aaf9
commit 7df73ca49e

View file

@ -110,6 +110,15 @@ const getWallPage = async (page, publicKey) => {
} }
return new Promise(res => { return new Promise(res => {
// forces data fetch
user
.get(Key.WALL)
.get(Key.PAGES)
.get(actualPageIdx.toString())
// @ts-ignore
.load(() => {})
process.nextTick(() => {
user user
.get(Key.WALL) .get(Key.WALL)
.get(Key.PAGES) .get(Key.PAGES)
@ -117,6 +126,7 @@ const getWallPage = async (page, publicKey) => {
// @ts-ignore // @ts-ignore
.load(res) .load(res)
}) })
})
}, },
maybePage => { maybePage => {
if (typeof maybePage !== 'object' || maybePage === null) { if (typeof maybePage !== 'object' || maybePage === null) {