Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Commit

Permalink
fix indicators script error
Browse files Browse the repository at this point in the history
ref #768
  • Loading branch information
sculove committed Mar 30, 2016
1 parent 5c7abab commit 0bfc861
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions build/iscroll-probe.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,10 @@ IScroll.prototype = {

// TODO: check if we can use array.map (wide compatibility and performance issues)
function _indicatorsMap (fn) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
if (that.indicators) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions build/iscroll-zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1011,8 +1011,10 @@ IScroll.prototype = {

// TODO: check if we can use array.map (wide compatibility and performance issues)
function _indicatorsMap (fn) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
if (that.indicators) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions build/iscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,10 @@ IScroll.prototype = {

// TODO: check if we can use array.map (wide compatibility and performance issues)
function _indicatorsMap (fn) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
if (that.indicators) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/indicator/_initIndicators.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@

// TODO: check if we can use array.map (wide compatibility and performance issues)
function _indicatorsMap (fn) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
if (that.indicators) {
for ( var i = that.indicators.length; i--; ) {
fn.call(that.indicators[i]);
}
}
}

Expand Down

0 comments on commit 0bfc861

Please sign in to comment.