Skip to content

Commit

Permalink
chore: upgrade deps (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuilder authored Nov 19, 2021
1 parent ef0bb84 commit f1e123b
Show file tree
Hide file tree
Showing 3 changed files with 3,257 additions and 5,363 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,33 +153,33 @@
"@types/jest": "^27.0.1",
"@types/react": "^17.0.17",
"@types/react-dom": "^17.0.9",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"autoprefixer": "^10.3.1",
"babel-eslint": "^10.1.0",
"babel-jest": "^27.0.6",
"babel-loader": "^8.2.2",
"babel-plugin-dev-expression": "^0.2.2",
"concurrently": "^6.2.1",
"coveralls": "^3.1.1",
"eslint": "^7.32.0",
"eslint": "^8.2.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"framer-motion": "^4.1.17",
"framer-motion": "^5.3.1",
"husky": "^4.3.8",
"intersection-observer": "^0.12.0",
"jest": "^27.0.6",
"lint-staged": "^11.1.2",
"microbundle": "^0.13.3",
"lint-staged": "^12.0.3",
"microbundle": "^0.14.2",
"npm-run-all": "^4.1.5",
"postcss": "^8.3.6",
"postcss-loader": "^6.1.1",
"prettier": "^2.3.2",
"prettier-plugin-pkg": "^0.10.0",
"prettier-plugin-pkg": "^0.11.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-test-renderer": "^17.0.2",
Expand Down
12 changes: 7 additions & 5 deletions src/stories/story-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IntersectionOptions } from '../index';

export function getRoot(options: IntersectionOptions) {
if (options.rootMargin && !options.root && window.self !== window.top) {
return (document as unknown) as Element;
return document as unknown as Element;
}
return options.root;
}
Expand All @@ -17,10 +17,12 @@ export function useValidateOptions(options: IntersectionOptions) {
try {
new IntersectionObserver(() => {}, finalOptions);
} catch (e) {
error = e.message.replace(
"Failed to construct 'IntersectionObserver': ",
'',
);
if (e instanceof Error) {
error = e.message.replace(
"Failed to construct 'IntersectionObserver': ",
'',
);
}
}

return { options: finalOptions, error };
Expand Down
Loading

1 comment on commit f1e123b

@vercel
Copy link

@vercel vercel bot commented on f1e123b Nov 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.