如果创建dom时,数据为空,可不可以不报错 #54
cthulhu-tww
started this conversation in
Ideas
Replies: 3 comments 2 replies
-
嗯,目前这个是intended behavior。因为tag functions不支持 |
Beta Was this translation helpful? Give feedback.
0 replies
-
FYI, |
Beta Was this translation helpful? Give feedback.
0 replies
-
感谢,我非常期待新的版本 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
首先感谢香草js帮助我的谷歌浏览器扩展程序节约了一半的代码。但是在使用过程中,我发现有个很令人费解的问题,我不知道是有意设计成这样还是如何。当我bind 一个object或者其它数据类型且当数据中出现了 null 或者 undefined时,我的js就会报错,导致我整个dom就会崩溃。这就会导致我必须不停的给object本身及其字段加上非空判断,并且加上“” 这种空字符串来保证我的js 不发生报错。而我的想法是如果数据为空,不如就仅仅是这个dom及其子dom不会渲染,而不必使整个dom树损坏不是吗。
Beta Was this translation helpful? Give feedback.
All reactions