Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit e5db1ba

Browse files
author
Je
committed
fix: fix useDeno fetching cached data
1 parent ea17938 commit e5db1ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aleph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function ALEPH({ initial }: {
5353
await import(getModuleImportUrl(baseUrl, { id: dep.url.replace(reModuleExt, '.js'), hash: dep.hash }, e.forceRefetch))
5454
}
5555
if (mod.asyncDeps.filter(({ url }) => url.startsWith('#useDeno.')).length > 0) {
56-
import(`/_aleph/data${[url.pathname, url.query.toString()].filter(Boolean).join('@')}/data.js` + (e.forceRefetch ? `?t=${Date.now()}` : '')).then(({ default: data }) => {
56+
await import(`/_aleph/data${[url.pathname, url.query.toString()].filter(Boolean).join('@')}/data.js` + (e.forceRefetch ? `?t=${Date.now()}` : '')).then(({ default: data }) => {
5757
if (util.isPlainObject(data)) {
5858
for (const key in data) {
5959
const useDenoUrl = `useDeno://${url.pathname}?${url.query.toString()}#${key}`
@@ -150,7 +150,7 @@ export function ALEPH({ initial }: {
150150
await import(getModuleImportUrl(baseUrl, { id: dep.url.replace(reModuleExt, '.js'), hash: dep.hash }))
151151
}
152152
if (mod.asyncDeps.filter(({ url }) => url.startsWith('#useDeno.')).length > 0) {
153-
import(`/_aleph/data${[url.pathname, url.query.toString()].filter(Boolean).join('@')}/data.js`).then(({ default: data }) => {
153+
await import(`/_aleph/data${[url.pathname, url.query.toString()].filter(Boolean).join('@')}/data.js`).then(({ default: data }) => {
154154
if (util.isPlainObject(data)) {
155155
for (const key in data) {
156156
const useDenoUrl = `useDeno://${url.pathname}?${url.query.toString()}#${key}`

0 commit comments

Comments
 (0)