Skip to content
Snippets Groups Projects
Commit ee3715ee authored by Rick Waldron's avatar Rick Waldron
Browse files

Improve assertion handling when comparison causes failure via coercion

parent f247a5fe
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,12 @@ assert._isSameValue = function (a, b) {
};
assert.sameValue = function (actual, expected, message) {
if (assert._isSameValue(actual, expected)) {
try {
if (assert._isSameValue(actual, expected)) {
return;
}
} catch (error) {
$ERROR(message + ' (_isSameValue operation threw) ' + error);
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment