Skip to content

Commit 13aeca6

Browse files
committed
squash: Address comments
1 parent c7904dc commit 13aeca6

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

modules/sdp/SDP.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-ignore
21
import { $iq } from 'strophe.js';
32

43
import FeatureFlags from '../flags/FeatureFlags';

modules/util/XMLUtils.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ export function parseXML(xmlString: string): Nullable<Document> {
1515
const parser = new DOMParser();
1616
const doc = parser.parseFromString(xmlString, 'text/xml');
1717

18-
// Check for parser errors - use documentElement since
19-
// Document.querySelector might not be polyfilled in React Native
20-
const parserError = doc.documentElement
21-
? findFirst(doc.documentElement, 'parsererror')
22-
: null;
18+
// Check for parser errors.
19+
const parserError = findFirst(doc, 'parsererror');
2320

2421
if (parserError) {
2522
logger.error('XML parsing error:', parserError.textContent || '');
@@ -152,7 +149,7 @@ export function findFirst(element: Element | Document, selector: string): Elemen
152149
try {
153150
return element.querySelector(selector);
154151
} catch (error) {
155-
logger.error('Query error:', selector, error);
152+
logger.error('findFirst error:', selector, error);
156153

157154
return null;
158155
}

0 commit comments

Comments
 (0)