mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
no packages and conf copied
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import type { StackFrame } from "error-stack-parser";
|
||||
|
||||
const unrelatedFunctionName = "renderWithHooks";
|
||||
|
||||
export const cleanStack = (stack: StackFrame[]) => {
|
||||
const firstUnrelatedIndex = stack.findIndex(
|
||||
(frame) => frame.functionName === unrelatedFunctionName,
|
||||
);
|
||||
|
||||
if (firstUnrelatedIndex !== -1) {
|
||||
return stack.slice(0, firstUnrelatedIndex);
|
||||
}
|
||||
|
||||
return stack;
|
||||
};
|
||||
Reference in New Issue
Block a user