Skip to content

Commit 6fd0c3d

Browse files
author
Bart Arribe
authored
Merge pull request #516 from AtticusFetch/master
Fix iOS initial index issue && Bump version
2 parents ac52429 + 97e4551 commit 6fd0c3d

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

package.json

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"name": "react-native-swiper",
3-
"keywords": ["react-component", "react-native", "ios"],
4-
"version": "1.5.9",
3+
"keywords": [
4+
"react-component",
5+
"react-native",
6+
"ios"
7+
],
8+
"version": "1.5.10",
59
"description": "Swiper component for React Native.",
610
"main": "index.js",
711
"scripts": {
@@ -12,7 +16,9 @@
1216
"test": "npm run lint"
1317
},
1418
"pre-commit": {
15-
"run": ["precommit"],
19+
"run": [
20+
"precommit"
21+
],
1622
"silent": true
1723
},
1824
"standard": {
@@ -25,7 +31,11 @@
2531
"setImmediate",
2632
"fetch"
2733
],
28-
"ignore": ["dist/", "mock/", "node_modules/"]
34+
"ignore": [
35+
"dist/",
36+
"mock/",
37+
"node_modules/"
38+
]
2939
},
3040
"ava": {
3141
"babel": "inherit",

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default class extends Component {
254254

255255
// only update the offset in state if needed, updating offset while swiping
256256
// causes some bad jumping / stuttering
257-
if (width !== this.state.width || height !== this.state.height) {
257+
if (!this.state.offset || width !== this.state.width || height !== this.state.height) {
258258
state.offset = offset
259259
}
260260
this.setState(state)

0 commit comments

Comments
 (0)