feat: setParseCallStackFunction(undefined) will restore the default behavior

This commit is contained in:
Zachary Haber 2022-06-17 14:37:10 -05:00 committed by Lam Wei Li
parent d53495a8ab
commit b139aafcab
No known key found for this signature in database
GPG Key ID: 90F6ABECF080D7BF

View File

@ -208,6 +208,8 @@ class Logger {
setParseCallStackFunction(parseFunction) {
if (typeof parseFunction === 'function') {
this.parseCallStack = parseFunction;
} else if (parseFunction === undefined) {
this.parseCallStack = defaultParseCallStack;
} else {
throw new TypeError('Invalid type passed to setParseCallStackFunction');
}