File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export default class ApplicationRoute extends Route {
11
11
@service playground ;
12
12
@service sentry ;
13
13
14
- beforeModel ( ) {
14
+ async beforeModel ( ) {
15
15
this . router . on ( 'routeDidChange' , ( ) => {
16
16
this . sentry . configureScope ( scope => {
17
17
scope . setTag ( 'routeName' , this . router . currentRouteName ) ;
@@ -31,6 +31,13 @@ export default class ApplicationRoute extends Route {
31
31
this . preloadPlaygroundCratesTask . perform ( ) . catch ( ( ) => {
32
32
// ignore all errors since we're only preloading here
33
33
} ) ;
34
+
35
+ // load ResizeObserver polyfill, only if required.
36
+ if ( ! ( 'ResizeObserver' in window ) ) {
37
+ console . debug ( 'Loading ResizeObserver polyfill…' ) ;
38
+ let module = await import ( '@juggle/resize-observer' ) ;
39
+ window . ResizeObserver = module . ResizeObserver ;
40
+ }
34
41
}
35
42
36
43
@action loading ( transition ) {
Original file line number Diff line number Diff line change 37
37
"trailingComma" : " all"
38
38
},
39
39
"dependencies" : {
40
+ "@juggle/resize-observer" : " 3.3.1" ,
40
41
"@sentry/browser" : " 6.13.3" ,
41
42
"@sentry/integrations" : " 6.13.3" ,
42
43
"chart.js" : " 3.5.1" ,
Original file line number Diff line number Diff line change 1718
1718
resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"
1719
1719
integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==
1720
1720
1721
+
1722
+ version "3.3.1"
1723
+ resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.3.1.tgz#b50a781709c81e10701004214340f25475a171a0"
1724
+ integrity sha512-zMM9Ds+SawiUkakS7y94Ymqx+S0ORzpG3frZirN3l+UlXUmSUR7hF4wxCVqW+ei94JzV5kt0uXBcoOEAuiydrw==
1725
+
1721
1726
"@miragejs/pretender-node-polyfill@^0.1.0":
1722
1727
version "0.1.2"
1723
1728
resolved "https://registry.yarnpkg.com/@miragejs/pretender-node-polyfill/-/pretender-node-polyfill-0.1.2.tgz#d26b6b7483fb70cd62189d05c95d2f67153e43f2"
You can’t perform that action at this time.
0 commit comments