mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-03 22:50:48 +00:00
Drop assign default value for parameters
This commit is contained in:
parent
46dbdd7136
commit
aa7bf1c019
9
index.js
9
index.js
@ -464,11 +464,14 @@ module.exports = {
|
|||||||
Instabug.isInstabugNotification(dict, isInstabugNotificationCallback);
|
Instabug.isInstabugNotification(dict, isInstabugNotificationCallback);
|
||||||
},
|
},
|
||||||
|
|
||||||
reportJsException: function (error, errorIdentifier = undefined) {
|
reportJsException: function (error, errorIdentifier) {
|
||||||
|
if (!error || !error instanceof Error)
|
||||||
|
throw new Error("You should pass an error object");
|
||||||
|
|
||||||
let jsStackTrace = instabugParser(error);
|
let jsStackTrace = instabugParser(error);
|
||||||
if (errorIdentifier instanceof undefined && error instanceof Error)
|
if (!errorIdentifier)
|
||||||
Instabug.reportJsException(jsStackTrace, error.message, null);
|
Instabug.reportJsException(jsStackTrace, error.message, null);
|
||||||
else if (errorIdentifier != null && error instanceof Error) {
|
else if (errorIdentifier) {
|
||||||
Instabug.reportJsException(jsStackTrace, error.message, errorIdentifier);
|
Instabug.reportJsException(jsStackTrace, error.message, errorIdentifier);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user