Skip to content

Commit 2cd8c6c

Browse files
committed
[refactor] remove unused fiberstack functions
1 parent fa3feba commit 2cd8c6c

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

packages/react-reconciler/src/ReactFiberStack.js

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ function createCursor<T>(defaultValue: T): StackCursor<T> {
2727
};
2828
}
2929

30-
function isEmpty(): boolean {
31-
return index === -1;
32-
}
33-
3430
function pop<T>(cursor: StackCursor<T>, fiber: Fiber): void {
3531
if (index < 0) {
3632
if (__DEV__) {
@@ -67,31 +63,4 @@ function push<T>(cursor: StackCursor<T>, value: T, fiber: Fiber): void {
6763

6864
cursor.current = value;
6965
}
70-
71-
function checkThatStackIsEmpty() {
72-
if (__DEV__) {
73-
if (index !== -1) {
74-
console.error(
75-
'Expected an empty stack. Something was not reset properly.',
76-
);
77-
}
78-
}
79-
}
80-
81-
function resetStackAfterFatalErrorInDev() {
82-
if (__DEV__) {
83-
index = -1;
84-
valueStack.length = 0;
85-
fiberStack.length = 0;
86-
}
87-
}
88-
89-
export {
90-
createCursor,
91-
isEmpty,
92-
pop,
93-
push,
94-
// DEV only:
95-
checkThatStackIsEmpty,
96-
resetStackAfterFatalErrorInDev,
97-
};
66+
export {createCursor, pop, push};

0 commit comments

Comments
 (0)