Skip to content

Commit a9b71e7

Browse files
committed
fix: Fix boolean options won't update to false. #96
1 parent a9cfa9d commit a9b71e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function ReactCodeMirror(props = {}, ref) {
4747
opt.mode = mode.mime;
4848
}
4949
Object.keys(opt).forEach((name) => {
50-
if (opt[name] && JSON.stringify(opt[name])) {
50+
if ((opt[name] || opt[name] === false) && JSON.stringify(opt[name])) {
5151
instance.setOption(name, opt[name]);
5252
}
5353
});

0 commit comments

Comments
 (0)