Commit 03eddcf
authored
fix: prevent unsafe access to dom nodes in getDocumentDirection (#1788)
If a provider is in the head using mgt-loader the synchronous loading of mgt scripts
causes LocaliztionHelper to attempt to access the body DOM node of the document before
the browser has parsed the entire document causing body to be null. Using optional chaining
avoids trying to call a method on a null object.1 parent c46e418 commit 03eddcf
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments