diff --git a/dom/media/tests/mochitest/test_peerConnection_transceivers.html b/dom/media/tests/mochitest/test_peerConnection_transceivers.html index 4ce159bdd4f2..13cc8f2537a9 100644 --- a/dom/media/tests/mochitest/test_peerConnection_transceivers.html +++ b/dom/media/tests/mochitest/test_peerConnection_transceivers.html @@ -423,11 +423,12 @@ pc.addTransceiver("foo"); ok(false, 'addTransceiver("foo") throws'); } - catch (e if e instanceof TypeError) { - ok(true, 'addTransceiver("foo") throws a TypeError'); - } catch (e) { - ok(false, 'addTransceiver("foo") throws a TypeError'); + if (e instanceof TypeError) { + ok(true, 'addTransceiver("foo") throws a TypeError'); + } else { + ok(false, 'addTransceiver("foo") throws a TypeError'); + } } hasProps(pc.getTransceivers(), []);