fix(runtime-core): fix unwanted warning with disabled compat flag #11126
+30
−2
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.
If you disable the "ATTR_FALSE_VALUE" in your compat config you expect that no warning will be thrown afterwards. But this still seems to be the case.
The warning also contains a instruction how to suppress the warning:
...suppress this warning with: configureCompat({ ATTR_FALSE_VALUE: false })
. So it will be expected that using this instruction the warning should be suppressed which is not the case.The issue reproduction can be found in the test. I hope it is the correct place 🙂
My fix switches the order and first checks, if the feature is enabled. If this is the case then it shows the warning. But with a disabled feature the warning for this feature won't be triggered anymore.