Skip to content

Commit 4f1cafc

Browse files
committed
fix: $param handeling
1 parent 61181ad commit 4f1cafc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/server.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class CoCreateLazyLoader {
4747
const valideUrl = new URL(`http://${req.headers.host}${req.url}`);
4848
const hostname = valideUrl.hostname;
4949
let organization
50+
5051
try {
5152
organization = await this.crud.getOrganization({ host: hostname });
5253
} catch {
@@ -173,11 +174,11 @@ class CoCreateLazyLoader {
173174

174175
let params = [], mainParam = false
175176
for (let i = 0; true; i++) {
176-
if (`$param[${i}]` in object) {
177-
params.push(data[`$param[${i}]`])
178-
delete data[`$param[${i}]`]
177+
if (`$param[${i}]` in data[name]) {
178+
params.push(data[name][`$param[${i}]`])
179+
delete data[name][`$param[${i}]`]
179180
} else if (!mainParam) {
180-
params.push([data[name]])
181+
params.push(data[name])
181182
mainParam = true
182183
} else {
183184
break;

0 commit comments

Comments
 (0)