Skip to content

Commit

Permalink
fix: Import Intersection-observer polyfill (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
Crash-- authored Jul 22, 2020
1 parent 245384c commit 513e17f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"watch:doc:kss": "nodemon --ext styl,md --watch stylus --exec 'yarn build:doc:kss && http-server build/styleguide -p 4242'"
},
"sideEffects": [
"*.css"
"*.css",
"intersection-observer"
],
"devDependencies": {
"@babel/cli": "7.7.4",
Expand Down Expand Up @@ -136,6 +137,7 @@
"classnames": "^2.2.5",
"date-fns": "^1.28.5",
"hammerjs": "^2.0.8",
"intersection-observer": "0.11.0",
"node-polyglot": "^2.2.2",
"normalize.css": "^7.0.0",
"react-hot-loader": "^4.3.11",
Expand Down
2 changes: 2 additions & 0 deletions react/LoadMore/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import PropTypes from 'prop-types'
import Button from '../Button'
import Spinner from '../Spinner'

import 'intersection-observer' // polyfill for safari (mobile and desktop)

const LoadMore = ({ fetchMore, label }) => {
const [isLoading, setIsLoading] = useState(false)
const elementRef = useRef()
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8048,6 +8048,11 @@ internal-ip@^4.3.0:
default-gateway "^4.2.0"
ipaddr.js "^1.9.0"

[email protected]:
version "0.11.0"
resolved "https://registry.yarnpkg.com/intersection-observer/-/intersection-observer-0.11.0.tgz#f4ea067070326f68393ee161cc0a2ca4c0040c6f"
integrity sha512-KZArj2QVnmdud9zTpKf279m2bbGfG+4/kn16UU0NL3pTVl52ZHiJ9IRNSsnn6jaHrL9EGLFM5eWjTx2fz/+zoQ==

into-stream@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-4.0.0.tgz#ef10ee2ffb6f78af34c93194bbdc36c35f7d8a9d"
Expand Down

0 comments on commit 513e17f

Please sign in to comment.