@@ -34,7 +34,7 @@ class Deck extends React.Component {
3434 lastSlide : slide
3535 } ) ;
3636 localStorage . setItem ( "spectacle-slide" ,
37- JSON . stringify ( { slide, forward : false , time : Date . now ( ) } ) ) ;
37+ JSON . stringify ( { slide : this . context . slide , forward : false , time : Date . now ( ) } ) ) ;
3838 this . _attachEvents ( ) ;
3939 }
4040 componentWillUnmount ( ) {
@@ -89,7 +89,7 @@ class Deck extends React.Component {
8989 this . setState ( {
9090 lastSlide : slide || 0
9191 } ) ;
92- if ( this . _checkFragments ( slide , data . forward ) ) {
92+ if ( this . _checkFragments ( this . context . slide , data . forward ) ) {
9393 this . context . router . replaceWith ( "/" + ( data . slide ) + this . _getSuffix ( ) ) ;
9494 }
9595 }
@@ -103,11 +103,11 @@ class Deck extends React.Component {
103103 if ( slide > 0 ) {
104104 this . context . router . replaceWith ( "/" + this . _getHash ( slide - 1 ) + this . _getSuffix ( ) ) ;
105105 localStorage . setItem ( "spectacle-slide" ,
106- JSON . stringify ( { slide : slide - 1 , forward : false , time : Date . now ( ) } ) ) ;
106+ JSON . stringify ( { slide : this . _getHash ( slide - 1 ) , forward : false , time : Date . now ( ) } ) ) ;
107107 }
108108 } else if ( slide > 0 ) {
109109 localStorage . setItem ( "spectacle-slide" ,
110- JSON . stringify ( { slide, forward : false , time : Date . now ( ) } ) ) ;
110+ JSON . stringify ( { slide : this . _getHash ( slide ) , forward : false , time : Date . now ( ) } ) ) ;
111111 }
112112 }
113113 _nextSlide ( ) {
@@ -119,11 +119,11 @@ class Deck extends React.Component {
119119 if ( slide < this . props . children . length - 1 ) {
120120 this . context . router . replaceWith ( "/" + this . _getHash ( slide + 1 ) + this . _getSuffix ( ) ) ;
121121 localStorage . setItem ( "spectacle-slide" ,
122- JSON . stringify ( { slide : slide + 1 , forward : true , time : Date . now ( ) } ) ) ;
122+ JSON . stringify ( { slide : this . _getHash ( slide + 1 ) , forward : true , time : Date . now ( ) } ) ) ;
123123 }
124124 } else if ( slide < this . props . children . length - 1 ) {
125125 localStorage . setItem ( "spectacle-slide" ,
126- JSON . stringify ( { slide, forward : true , time : Date . now ( ) } ) ) ;
126+ JSON . stringify ( { slide : this . _getHash ( slide ) , forward : true , time : Date . now ( ) } ) ) ;
127127 }
128128 }
129129 _getHash ( slide ) {
@@ -317,7 +317,7 @@ class Deck extends React.Component {
317317 let componentToRender ;
318318 if ( this . context . presenter ) {
319319 componentToRender = ( < Presenter slides = { this . props . children }
320- slide = { this . _getSlideIndex ( ) } lastSlide = { this . state . lastSlide } /> ) ;
320+ slide = { this . _getSlideIndex ( ) } hash = { this . context . slide } lastSlide = { this . state . lastSlide } /> ) ;
321321 } else if ( this . context . export ) {
322322 componentToRender = < Export slides = { this . props . children } /> ;
323323 } else if ( this . context . overview ) {
0 commit comments