fix: innerHTML should be string

This commit is contained in:
Amour1688 2020-08-20 09:22:02 +08:00
parent 831987885b
commit f96f8880b9

View File

@ -222,7 +222,7 @@ describe('Transform JSX', () => {
onClick() { onClick() {
calls.push(3); calls.push(3);
}, },
innerHTML: 2, innerHTML: '2',
class: ['a', 'b'], class: ['a', 'b'],
}; };
@ -418,7 +418,7 @@ describe('variables outside slots', () => {
}, },
render() { render() {
const attrs = { const attrs = {
innerHTML: this.val, innerHTML: `${this.val}`,
}; };
return ( return (
<A inc={this.inc}> <A inc={this.inc}>
@ -450,7 +450,7 @@ describe('variables outside slots', () => {
}, },
render() { render() {
const attrs = { const attrs = {
innerHTML: this.val, innerHTML: `${this.val}`,
}; };
const textarea = <textarea id="textarea" {...attrs} />; const textarea = <textarea id="textarea" {...attrs} />;
return ( return (