Skip to content

Commit 4ecae44

Browse files
committed
fix(config_compiler): null value should not overwrite a normal key in a merged tree
1 parent a862298 commit 4ecae44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rime/config/config_compiler.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ inline static bool IsMerging(const string& key,
140140
bool merge_tree) {
141141
return key == ConfigCompiler::MERGE_DIRECTIVE ||
142142
boost::ends_with(key, ADD_SUFFIX_OPERATOR) ||
143-
(merge_tree && Is<ConfigMap>(value) &&
143+
(merge_tree && (!value || Is<ConfigMap>(value)) &&
144144
!boost::ends_with(key, EQU_SUFFIX_OPERATOR));
145145
}
146146

0 commit comments

Comments
 (0)