🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@andrewseguin
Copy link
Contributor

@andrewseguin andrewseguin commented Dec 9, 2025

If the computed's toString is called and node.value is a Symbol, the browser will throw an exception ERROR TypeError: Cannot convert a Symbol value to a string

Symbols cannot be implicitly changed to strings. This change changes the conversion to be explicit by wrapping node.value with String()

This can be reproduced if you create a computed with createComputed(computation, equal) and call toString() while node.value is something like Symbol(UNSET)

@pullapprove pullapprove bot added the requires: TGP This PR requires a passing TGP before merging is allowed label Dec 9, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Dec 9, 2025
@ngbot ngbot bot added this to the Backlog milestone Dec 9, 2025
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

If the computed's `toString` is called and `node.value` is a Symbol, the browser will throw an exception `ERROR TypeError: Cannot convert a Symbol value to a string`

Symbols cannot be implicitly changed to strings. This change changes the conversion to be explicit by wrapping `node.value` with `String()`

This can be reproduced if you create a computed with `createComputed(computation, equal)` and call `toString()` while `node.value` is something like `Symbol(UNSET)`
@JeanMeche
Copy link
Member

TGP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime requires: TGP This PR requires a passing TGP before merging is allowed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants