@egjs/flicking 3.9.0 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egjs/flicking",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Everyday 30 million people experience. It's reliable, flexible and extendable carousel.",
5
5
  "main": "dist/flicking.js",
6
6
  "module": "dist/flicking.esm.js",
@@ -22,11 +22,7 @@
22
22
  "demo:deploy": "npm run build && npm run jsdoc && npm run demo:prebuild-version && gh-pages -d docs/build/ --add --remote upstream",
23
23
  "release": "release-helper upstream",
24
24
  "changelog": "node ./config/changelog.js",
25
- "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
26
- "packages": "npm run packages:update && npm run packages:build && npm run packages:publish",
27
- "packages:update": "pvu --update=react-flicking,ngx-flicking/projects/ngx-flicking,vue-flicking",
28
- "packages:build": "pvu --build=react-flicking,ngx-flicking,vue-flicking",
29
- "packages:publish": "pvu --publish=react-flicking,ngx-flicking/dist/ngx-flicking,vue-flicking"
25
+ "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
30
26
  },
31
27
  "repository": {
32
28
  "type": "git",
@@ -1272,7 +1272,7 @@ export default class Viewport {
1272
1272
 
1273
1273
  const areaPrev = (relativeHangerPosition - relativeAnchorPosition) % sumOriginalPanelSize;
1274
1274
  let sizeSum = 0;
1275
- let panelAtLeftBoundary!: Panel;
1275
+ let panelAtLeftBoundary: Panel | null = null;
1276
1276
  for (const panel of reversedPanels) {
1277
1277
  if (!panel) {
1278
1278
  continue;
@@ -1286,7 +1286,7 @@ export default class Viewport {
1286
1286
 
1287
1287
  const areaNext = (viewportSize - relativeHangerPosition + relativeAnchorPosition) % sumOriginalPanelSize;
1288
1288
  sizeSum = 0;
1289
- let panelAtRightBoundary!: Panel;
1289
+ let panelAtRightBoundary: Panel | null = null;
1290
1290
  for (const panel of panels) {
1291
1291
  if (!panel) {
1292
1292
  continue;
@@ -1299,7 +1299,8 @@ export default class Viewport {
1299
1299
  }
1300
1300
 
1301
1301
  // Need one more set of clones on prev area of original panel 0
1302
- const needCloneOnPrev = panelAtLeftBoundary.getIndex() !== 0
1302
+ const needCloneOnPrev = (panelAtLeftBoundary && panelAtRightBoundary)
1303
+ && panelAtLeftBoundary.getIndex() !== 0
1303
1304
  && panelAtLeftBoundary.getIndex() <= panelAtRightBoundary.getIndex();
1304
1305
 
1305
1306
  // Visible count of panel 0 on first screen