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

Commit edb298b

Browse files
committed
aofetch html fix
1 parent d51af4e commit edb298b

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

next_app/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ yarn-error.log*
4040
*.tsbuildinfo
4141
next-env.d.ts
4242

43-
analytics.db
43+
analytics.db
44+
45+
test.html

next_app/src/lib/ao-vars.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ const processHtml = `<!DOCTYPE html>
116116
<script type="module">
117117
import { aofetch } from "https://unpkg.com/ao-fetch@latest/dist/browser.mjs";
118118
119-
const process = window.location.pathname.split("/")[1];
119+
const _process = window.location.pathname.split("/")[1];
120120
const path = "/" + window.location.pathname.split("/").splice(2).join("/");
121-
window.process = process;
121+
window._process = _process;
122122
window.path = path;
123123
124-
console.log(process, path);
124+
console.log(_process, path);
125125
126126
try {
127-
const res = await aofetch(process + path);
127+
const res = await aofetch(_process + path);
128128
if (res && res.status == 200) {
129129
console.log(res);
130130
try {

0 commit comments

Comments
 (0)