Skip to content

Commit

Permalink
remove use of invariant
Browse files Browse the repository at this point in the history
  • Loading branch information
josephsavona committed Oct 21, 2021
1 parent 4ba534c commit f2a9fc7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-dom/src/server/ReactPartialRendererHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function resetHooksState(): void {
}

function getCacheSignal() {
invariant(false, 'Not implemented.');
throw new Error('Not implemented.');
}

function getCacheForType<T>(resourceType: () => T): T {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberHooks.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,7 @@ function markUpdateInDevTools(fiber, lane, action) {

function getCacheSignal(): AbortSignal {
if (!enableCache) {
invariant(false, 'Not implemented.');
throw new Error('Not implemented.');
}
const cache: Cache = readContext(CacheContext);
return cache.controller.signal;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberHooks.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,7 @@ function markUpdateInDevTools(fiber, lane, action) {

function getCacheSignal(): AbortSignal {
if (!enableCache) {
invariant(false, 'Not implemented.');
throw new Error('Not implemented.');
}
const cache: Cache = readContext(CacheContext);
return cache.controller.signal;
Expand Down

0 comments on commit f2a9fc7

Please sign in to comment.