Skip to content

Commit dad86dd

Browse files
author
kiran
committed
Merge pull request akiran#151 from Andrewlee5889/master
Update initial slide on new thumbnail event
2 parents 7ba7a76 + ce7fcab commit dad86dd

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

dist/react-slick.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ return /******/ (function(modules) { // webpackBootstrap
253253
}
254254
},
255255
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
256+
if (this.props.slickGoTo != nextProps.slickGoTo) {
257+
this.setState({ currentSlide: nextProps.slickGoTo });
258+
}
256259
this.update(nextProps);
257260
},
258261
componentDidUpdate: function componentDidUpdate() {
@@ -1215,12 +1218,14 @@ return /******/ (function(modules) { // webpackBootstrap
12151218
Licensed under the MIT License (MIT), see
12161219
http://jedwatson.github.io/classnames
12171220
*/
1221+
/* global define */
12181222

12191223
(function () {
12201224
'use strict';
12211225

1222-
function classNames () {
1226+
var hasOwn = {}.hasOwnProperty;
12231227

1228+
function classNames () {
12241229
var classes = '';
12251230

12261231
for (var i = 0; i < arguments.length; i++) {
@@ -1229,15 +1234,13 @@ return /******/ (function(modules) { // webpackBootstrap
12291234

12301235
var argType = typeof arg;
12311236

1232-
if ('string' === argType || 'number' === argType) {
1237+
if (argType === 'string' || argType === 'number') {
12331238
classes += ' ' + arg;
1234-
12351239
} else if (Array.isArray(arg)) {
12361240
classes += ' ' + classNames.apply(null, arg);
1237-
1238-
} else if ('object' === argType) {
1241+
} else if (argType === 'object') {
12391242
for (var key in arg) {
1240-
if (arg.hasOwnProperty(key) && arg[key]) {
1243+
if (hasOwn.call(arg, key) && arg[key]) {
12411244
classes += ' ' + key;
12421245
}
12431246
}
@@ -1249,15 +1252,14 @@ return /******/ (function(modules) { // webpackBootstrap
12491252

12501253
if (typeof module !== 'undefined' && module.exports) {
12511254
module.exports = classNames;
1252-
} else if (true){
1253-
// AMD. Register as an anonymous module.
1255+
} else if (true) {
1256+
// register as 'classnames', consistent with npm package name
12541257
!(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
12551258
return classNames;
12561259
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
12571260
} else {
12581261
window.classNames = classNames;
12591262
}
1260-
12611263
}());
12621264

12631265

0 commit comments

Comments
 (0)