Skip to content

Commit

Permalink
fix(runtime): 组件 id 必须是 string,fix #8515
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj committed Jan 15, 2021
1 parent 3a54d90 commit d56e3a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/taro-runtime/src/dom/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ export class TaroElement extends TaroNode {
qualifiedName = Shortcuts.Style
} else if (qualifiedName === 'id') {
eventSource.delete(this.uid)
this.props[qualifiedName] = this.uid = value as string
eventSource.set(value as string, this)
value = String(value)
this.props[qualifiedName] = this.uid = value
eventSource.set(value, this)
qualifiedName = 'uid'
} else {
if (qualifiedName === 'class') {
Expand Down

0 comments on commit d56e3a3

Please sign in to comment.