File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -55,15 +55,15 @@ class ImageCacheProvider extends React.Component {
55
55
}
56
56
57
57
componentWillMount ( ) {
58
- this . preloadImages ( ) ;
58
+ this . preloadImages ( this . props . urlsToPreload ) ;
59
59
}
60
60
61
61
componentWillReceiveProps ( nextProps ) {
62
62
// reset imageCacheManager in case any option changed
63
63
this . imageCacheManager = null ;
64
64
// preload new images if needed
65
65
if ( this . props . urlsToPreload !== nextProps . urlsToPreload ) {
66
- this . preloadImages ( ) ;
66
+ this . preloadImages ( nextProps . urlsToPreload ) ;
67
67
}
68
68
}
69
69
@@ -79,9 +79,9 @@ class ImageCacheProvider extends React.Component {
79
79
return this . imageCacheManager ;
80
80
}
81
81
82
- preloadImages ( ) {
82
+ preloadImages ( urlsToPreload ) {
83
83
const imageCacheManager = this . getImageCacheManager ( ) ;
84
- ImageCachePreloader . preloadImages ( this . props . urlsToPreload , imageCacheManager , this . props . numberOfConcurrentPreloads )
84
+ ImageCachePreloader . preloadImages ( urlsToPreload , imageCacheManager , this . props . numberOfConcurrentPreloads )
85
85
. then ( ( ) => this . props . onPreloadComplete ( ) ) ;
86
86
}
87
87
You can’t perform that action at this time.
0 commit comments