Skip to content

Commit 8a6b38e

Browse files
committed
use optional chaining
1 parent 3e71592 commit 8a6b38e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/base/browser/dom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,11 +784,11 @@ function getSharedStyleSheet(): HTMLStyleElement {
784784
}
785785

786786
function getDynamicStyleSheetRules(style: any) {
787-
if (style && style.sheet && style.sheet.rules) {
787+
if (style?.sheet?.rules) {
788788
// Chrome, IE
789789
return style.sheet.rules;
790790
}
791-
if (style && style.sheet && style.sheet.cssRules) {
791+
if (style?.sheet?.cssRules) {
792792
// FF
793793
return style.sheet.cssRules;
794794
}

0 commit comments

Comments
 (0)