Skip to content

Commit

Permalink
Merge pull request #1772 from AndyFong/hotfix/share-display
Browse files Browse the repository at this point in the history
fix(Share): Display Share param p parse error
  • Loading branch information
scottsut authored May 29, 2020
2 parents 1c84515 + 0cb41c2 commit 6bdacb3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions webapp/share/containers/Display/Reveal/Reveal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import React, { useEffect } from 'react'
import { useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'

import { makeSelectDisplay, makeSelectSlidesCount } from '../selectors'

Expand All @@ -38,8 +37,7 @@ const ShareDisplayReveal: React.FC = () => {
displayParams || DefaultDisplayParams

const slidesCount = useSelector(makeSelectSlidesCount())
const history = useHistory()
const slideNumberParam = new URLSearchParams(history.location.search).get('p')
const slideNumberParam = new URLSearchParams(window.location.search).get('p')
const slideNumber = +slideNumberParam
useEffect(() => {
Reveal.initialize({
Expand Down

0 comments on commit 6bdacb3

Please sign in to comment.