-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
COMP: qwik-cityP4: urgentIf Bug - it makes Qwik unstable and affects the majority of usersIf Bug - it makes Qwik unstable and affects the majority of usersTYPE: bugSomething isn't workingSomething isn't working
Description
Which component is affected?
Qwik Runtime
Describe the bug
I updated to qwik 1.17.0 and found that when importing the @modular-forms/qwik validate function, "this" is undefined when used within a server$ function and when that function is called within export const onGet.
🐞 this incorrectly console logs as undefined
export const onGet: RequestHandler = async (event) => {
visitorEventAction();
return event.next();
};✔ this correctly console logs the url
export default component$(() => {
visitorEventAction();
return (
<>
<h1>Hi</h1>
</>
);
});I included a stackblitz link to the demo but it doesnt load.
Reproduction
https://stackblitz.com/github/tuurbo/qwik-server-this-bug
Steps to reproduce
install deps, pnpm run dev, load site, see "this" logged as undefined on the dev server.
repo: tuurbo/qwik-server-this-bug@9cc61a2
System Info
System:
OS: Windows 10 10.0.19045
CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900HK
Memory: 6.14 GB / 31.68 GB
Binaries:
Node: 24.4.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 11.6.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.17.1 - C:\Program Files\nodejs\pnpm.CMD
bun: 1.2.23 - C:\Users\dlf19\.bun\bin\bun.EXE
Browsers:
Chrome: 141.0.7390.55
Edge: Chromium (140.0.3485.54)
Firefox: 141.0 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.19041.5794Additional Information
No response
wmertens and wakonp
Metadata
Metadata
Assignees
Labels
COMP: qwik-cityP4: urgentIf Bug - it makes Qwik unstable and affects the majority of usersIf Bug - it makes Qwik unstable and affects the majority of usersTYPE: bugSomething isn't workingSomething isn't working