We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cd62bd commit 7f91192Copy full SHA for 7f91192
packages/qwik/src/core/state/common.ts
@@ -150,7 +150,8 @@ export type NoSerialize<T> = (T & { __no_serialize__: true }) | undefined;
150
*/
151
// </docs>
152
export const noSerialize = <T extends object | undefined>(input: T): NoSerialize<T> => {
153
- if (input != null) {
+ // only add supported values to the noSerializeSet, prevent console errors
154
+ if ((typeof input === 'object' && input !== null) || typeof input === 'function') {
155
noSerializeSet.add(input);
156
}
157
return input as any;
0 commit comments