From f8ad7a2e7c1e053554a532fcbcfe092e3bb27b24 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Fri, 6 Nov 2015 21:35:34 +0800 Subject: [PATCH] fix checkbox default toString() bug --- src/Editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Editor.js b/src/Editor.js index 9c9425c77..88dfbd368 100644 --- a/src/Editor.js +++ b/src/Editor.js @@ -68,7 +68,7 @@ var Editor=function(editable, attr, format, editorClass, defaultValue){ attr.className = attr.className.replace('form-control',''); attr.className += ' checkbox pull-right'; - let checked = defaultValue.toString() == values.split(':')[0]?true:false; + let checked = defaultValue && defaultValue.toString() == values.split(':')[0]?true:false; return (