Skip to content

Commit

Permalink
fix: there is a bug when we change DEBUG into true
Browse files Browse the repository at this point in the history
  • Loading branch information
wuls committed Jul 2, 2024
1 parent 3b0c8bf commit 1fc58c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/qwik/src/core/v2/client/vnode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ import {
QStyle,
QStylesAllSelector,
} from '../../util/markers';
import { isHtmlElement } from '../../util/types';
import { isHtmlElement, isObject } from '../../util/types';
import { DEBUG_TYPE, QContainerValue, VirtualType, VirtualTypeName } from '../shared/types';
import { VNodeDataChar } from '../shared/vnode-data-types';
import { getDomContainer, _getQContainerElement } from './dom-container';
Expand All @@ -164,6 +164,7 @@ import {
vnode_getElementNamespaceFlags,
} from './vnode-namespace';
import { escapeHTML } from '../shared/character-escaping';
import { SignalImpl } from '../../state/signal';

//////////////////////////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -1879,8 +1880,15 @@ const stringify = (value: any): any => {
}
} else if (Array.isArray(value)) {
return '[' + value.map(stringify).join(', ') + ']';
} if (value instanceof SignalImpl) {
return stringify(value.value)
} else {
return String(value);
if(value.toString){
return String(value);
}else {
return JSON.stringify(value)
}

}
} finally {
stringifyPath.pop();
Expand Down

0 comments on commit 1fc58c5

Please sign in to comment.