diff --git a/yamldifftool.py b/yamldifftool.py index 92ff463..05bbf8e 100644 --- a/yamldifftool.py +++ b/yamldifftool.py @@ -16,9 +16,8 @@ def traverse_and_set(user_provided, root_diff, path): def filter_defaults(base, user_provided, root_diff, path=[], strict=False): if type(user_provided) is dict: for key in user_provided.keys(): - if base is None: - continue - if type(base) is str: + if base is None or type(base) is str: + traverse_and_set(user_provided.get(key), root_diff, path + [key]) continue if not strict and key not in base.keys(): traverse_and_set(user_provided.get(key), root_diff, path + [key])