Skip to content

Commit b4e2fe3

Browse files
Merge branch 'yossijacob-startAt-does-not-work-as-expected't push origin master
2 parents 61ca7fa + 38c5675 commit b4e2fe3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/TourPortal.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,17 @@ class TourPortal extends Component {
102102
}
103103

104104
componentDidMount() {
105-
const { isOpen } = this.props
105+
const { isOpen, startAt } = this.props
106106
if (isOpen) {
107-
this.open()
107+
this.open(startAt)
108108
}
109109
}
110110

111111
componentWillReceiveProps(nextProps) {
112112
const { isOpen, update, updateDelay } = this.props
113113

114114
if (!isOpen && nextProps.isOpen) {
115-
this.open()
115+
this.open(nextProps.startAt)
116116
} else if (isOpen && !nextProps.isOpen) {
117117
this.close()
118118
}
@@ -141,8 +141,8 @@ class TourPortal extends Component {
141141
}
142142
}
143143

144-
open() {
145-
const { onAfterOpen, startAt } = this.props
144+
open(startAt) {
145+
const { onAfterOpen } = this.props
146146
this.setState(
147147
prevState => ({
148148
isOpen: true,

0 commit comments

Comments
 (0)