Skip to content

Commit

Permalink
Automatic!
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikb committed Jan 15, 2021
1 parent d1da534 commit 07291f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ domdom has full TypeScript support, it's written in TypeScript.

### GodMode

An experimental mode. Creates
An **EXPERIMENTAL** mode. Creates
a [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy). When properties are
modified `set`/`unset` will be called automatically.
This makes it much easier to work with TypeScript and types.
Expand Down
2 changes: 2 additions & 0 deletions domdom/dom-stower.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export class DomStower implements Stower {
return document.createTextNode(`${child}`);
} else if (isProbablyPlainObject(child)) {
return document.createTextNode(JSON.stringify(child));
} else if (child instanceof Error) {
return document.createTextNode(`${child.name}: ${child.message}`);
}
return child;
}
Expand Down

0 comments on commit 07291f8

Please sign in to comment.