object Array's contain a "unique" object Function

You must Login before you can answer or comment on any questions.

A "unique" object Function is now appearing in the majority of my object Arrays. Trying to work out why all of sudden this is occurring but can't find a thing.

I'm using Titanium SDK 3.0.0.GA, I've tried rolling back to 2.1.4.GA but the problem still occurs. Any ideas?

When I debug the function in the object Array, it returns "KrollCallback"

— asked 2 years ago by Dallas Clark
1 Comment
  • Typo: object Arrays contain a "unique" object Function

    — commented 2 years ago by Dallas Clark

1 Answer

Found the problem, I added the following function to the application which is added a "unique" value on every array. Removed it and it now works fine.

//
//
//
Array.prototype.unique = function(){
  return this.filter(function(s, i, a){
    return i == a.lastIndexOf(s);
  });
}

Your Answer

Think you can help? Login to answer this question!