[Pkg-javascript-commits] [dojo] 08/13: Fixes #9499 on the 1.3 branch.

David Prévot taffit at moszumanska.debian.org
Mon May 11 20:12:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.3.2
in repository dojo.

commit 556b2b7e86ece647a7d3e59d3c2137a4fb0f22c7
Author: Alex Russell <slightlyoff at chromium.org>
Date:   Thu Jul 9 21:52:47 2009 +0000

    Fixes #9499 on the 1.3 branch.
    
    !strict
    
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.3/dojo@18754 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 _base/NodeList.js      | 4 ++++
 tests/_base/query.html | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/_base/NodeList.js b/_base/NodeList.js
index e012d01..73e8019 100644
--- a/_base/NodeList.js
+++ b/_base/NodeList.js
@@ -19,6 +19,10 @@ dojo.require("dojo._base.array");
 
 	var loopBody = function(f, a, o){
 		a = [0].concat(aps.call(a, 0));
+		if(!a.sort){
+			// make sure it's a real array before we pass it on to be wrapped
+			a = aps.call(a, 0);
+		}
 		o = o || d.global;
 		return function(node){
 			a[0] = node;
diff --git a/tests/_base/query.html b/tests/_base/query.html
index ddda44c..392bc21 100644
--- a/tests/_base/query.html
+++ b/tests/_base/query.html
@@ -232,6 +232,11 @@
 							doh.is(0, dojo.query("RESULT[THINGER]", de).length, "result elements with attrs (wrong)");
 							doh.is(2, dojo.query("RESULT[thinger]", de).length, "result elements with attrs");
 							doh.is(1, dojo.query("RESULT[thinger=blah]", de).length, "result elements with attr value");
+						},
+						function sort(){
+							var i = dojo.query("div");
+							// smoke test
+							i.sort(function(a,b){ return 1; })
 						}
 					]
 				);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list