We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c3e698 commit b4f1172Copy full SHA for b4f1172
plugins/optimization-detective/detect.js
@@ -127,12 +127,6 @@ function recursiveFreeze( obj ) {
127
Object.freeze( obj );
128
}
129
130
-// This needs to be captured early in case the user later resizes the window.
131
-const viewport = {
132
- width: win.innerWidth,
133
- height: win.innerHeight,
134
-};
135
-
136
/**
137
* URL Metric being assembled for submission.
138
*
@@ -489,7 +483,10 @@ export default async function detect( {
489
483
490
484
urlMetric = {
491
485
url: currentUrl,
492
- viewport,
486
+ viewport: {
487
+ width: win.innerWidth,
488
+ height: win.innerHeight,
+ },
493
elements: [],
494
};
495
0 commit comments