Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #13
We already had some validation checking for undefined values, but it happened after we ran
mergeOverrides
which was unintentionally cleaning up these values by cloning layers usingJSON.parse(JSON.stringify())
.Since we still want to validate the fully built layer, this PR:
cloneDeep
method for cloning the object to maintain undefined valuesmergeOverrides
does not remove undefined valuesNoting here that we are not explicitly warning that a variable is missing, but that a property value is undefined (which would usually be due to a missing variable). This can be easily inferred from the message to get to the root of the problem.