Skip to content

Commit f1e123b

Browse files
authored
chore: upgrade deps (#518)
1 parent ef0bb84 commit f1e123b

File tree

3 files changed

+3257
-5363
lines changed

3 files changed

+3257
-5363
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,33 +153,33 @@
153153
"@types/jest": "^27.0.1",
154154
"@types/react": "^17.0.17",
155155
"@types/react-dom": "^17.0.9",
156-
"@typescript-eslint/eslint-plugin": "^4.29.1",
157-
"@typescript-eslint/parser": "^4.29.1",
156+
"@typescript-eslint/eslint-plugin": "^5.4.0",
157+
"@typescript-eslint/parser": "^5.4.0",
158158
"autoprefixer": "^10.3.1",
159159
"babel-eslint": "^10.1.0",
160160
"babel-jest": "^27.0.6",
161161
"babel-loader": "^8.2.2",
162162
"babel-plugin-dev-expression": "^0.2.2",
163163
"concurrently": "^6.2.1",
164164
"coveralls": "^3.1.1",
165-
"eslint": "^7.32.0",
165+
"eslint": "^8.2.0",
166166
"eslint-config-react-app": "^6.0.0",
167-
"eslint-plugin-flowtype": "^5.9.0",
167+
"eslint-plugin-flowtype": "^8.0.3",
168168
"eslint-plugin-import": "^2.24.0",
169169
"eslint-plugin-jsx-a11y": "^6.4.1",
170170
"eslint-plugin-react": "^7.24.0",
171171
"eslint-plugin-react-hooks": "^4.2.0",
172-
"framer-motion": "^4.1.17",
172+
"framer-motion": "^5.3.1",
173173
"husky": "^4.3.8",
174174
"intersection-observer": "^0.12.0",
175175
"jest": "^27.0.6",
176-
"lint-staged": "^11.1.2",
177-
"microbundle": "^0.13.3",
176+
"lint-staged": "^12.0.3",
177+
"microbundle": "^0.14.2",
178178
"npm-run-all": "^4.1.5",
179179
"postcss": "^8.3.6",
180180
"postcss-loader": "^6.1.1",
181181
"prettier": "^2.3.2",
182-
"prettier-plugin-pkg": "^0.10.0",
182+
"prettier-plugin-pkg": "^0.11.0",
183183
"react": "^17.0.2",
184184
"react-dom": "^17.0.2",
185185
"react-test-renderer": "^17.0.2",

src/stories/story-utils.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IntersectionOptions } from '../index';
22

33
export function getRoot(options: IntersectionOptions) {
44
if (options.rootMargin && !options.root && window.self !== window.top) {
5-
return (document as unknown) as Element;
5+
return document as unknown as Element;
66
}
77
return options.root;
88
}
@@ -17,10 +17,12 @@ export function useValidateOptions(options: IntersectionOptions) {
1717
try {
1818
new IntersectionObserver(() => {}, finalOptions);
1919
} catch (e) {
20-
error = e.message.replace(
21-
"Failed to construct 'IntersectionObserver': ",
22-
'',
23-
);
20+
if (e instanceof Error) {
21+
error = e.message.replace(
22+
"Failed to construct 'IntersectionObserver': ",
23+
'',
24+
);
25+
}
2426
}
2527

2628
return { options: finalOptions, error };

0 commit comments

Comments
 (0)