mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-22 06:28:46 -04:00
support processing of Error types in notifications, adresses #441
This commit is contained in:
parent
7ab6411f71
commit
b1be74a56f
3 changed files with 5 additions and 2 deletions
|
@ -1544,6 +1544,9 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
} else if (typeof args === 'string') {
|
||||
// convert string to array if needed
|
||||
args = [args];
|
||||
} else if (args instanceof Error) {
|
||||
// extract message into array if needed
|
||||
args = [args.message];
|
||||
}
|
||||
|
||||
// pass to custom handler if defined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue