mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update scope declaration invariant to support error grouping
This invariant interpolated values into the `reason` which prevent our internal tooling from grouping related errors. This PR updates to make the reason static and interpolate the description.
This commit is contained in:
+2
-2
@@ -435,8 +435,8 @@ function codegenReactiveScope(
|
||||
);
|
||||
if (testCondition === null) {
|
||||
CompilerError.invariant(firstOutputIndex !== null, {
|
||||
reason: `Expected scope '@${scope.id}' to have at least one declaration`,
|
||||
description: null,
|
||||
reason: `Expected scope to have at least one declaration`,
|
||||
description: `Scope '@{scope.id} has no declarations`,
|
||||
loc: null,
|
||||
suggestions: null,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user