I have been experiencing a problem with ExtJS:
this.indexOf is not a function
I found out that this is being caused by the below code in the ExtJS library:
remove : function(o){
var index = this.indexOf(o);
if(index != -1){
this.splice(index, 1);
}
return this;
}
I read this http://mankzblog.wordpress.com/2009/05/23/trying-to-combine-ext-core-and... blog post and it suggests using using hasOwnProperty.
So i fiddles just a little bit and found this if statement on line 85 of jquery.drilldown.js:
if (breadcrumb[key]) {
and i changed it to this:
if (breadcrumb.hasOwnProperty(key)) {
which appears to have sorted out the issue.
I am not sure if this will help anyone, but it is a useful thing to know as it left me scratching my head for a little while.
I can create a patch for this if anyone else finds this useful.
Comment | File | Size | Author |
---|---|---|---|
#1 | jquery.drilldown.js_.patch | 487 bytes | jurgenhaas |
Comments
Comment #1
jurgenhaasThis happened to me as well (see #1277678: JavaScript Error in aloha.js) and attached is a patch (against the D7 version of this module) and it would be great if that could be submitted by the maintainer.
Comment #2
paulgemini CreditAttribution: paulgemini commented@Jurgenhaas: Your patch looks a bit off to me. I'm using the latest branch of Admin and here's what the code looks like, starting at line 78:
Comment #3
jurgenhaasMy appologies, I missed the latest changes in the dev release and my patch was indeed based on 7.x-2.0-beta3.
However, I downloaded the latest dev release just now and that looks like this:
So I guess the code in comment #2 is not committed yet, is it?
Comment #4
skwashd CreditAttribution: skwashd commented