File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export type UseBreakpointsResult = [any, any] & Matches;
28
28
const boxOptions = {
29
29
BORDER_BOX : 'border-box' , // https://caniuse.com/mdn-api_resizeobserverentry_borderboxsize
30
30
CONTENT_BOX : 'content-box' , // https://caniuse.com/mdn-api_resizeobserverentry_contentboxsize
31
- DEVICE_PIXEL_CONTENT_BOX : 'device-pixel-content-box' // https://github .com/w3c/csswg-drafts/pull/4476
31
+ DEVICE_PIXEL_CONTENT_BOX : 'device-pixel-content-box' // https://caniuse .com/mdn-api_resizeobserverentry_devicepixelcontentboxsize
32
32
} ;
33
33
34
34
/**
@@ -106,11 +106,7 @@ export const useBreakpoints = (
106
106
break ;
107
107
108
108
case boxOptions . DEVICE_PIXEL_CONTENT_BOX :
109
- if ( typeof resizeObserverEntry . devicePixelContentBoxSize !== 'undefined' ) {
110
- observedBoxSize = resizeObserverEntry . devicePixelContentBoxSize [ fragment ] ;
111
- } else {
112
- throw Error ( 'resizeObserverEntry does not contain devicePixelContentBoxSize.' ) ;
113
- }
109
+ observedBoxSize = resizeObserverEntry . devicePixelContentBoxSize [ fragment ] ;
114
110
break ;
115
111
116
112
default :
You can’t perform that action at this time.
0 commit comments