[Pkg-javascript-commits] [ltx] 15/469: xml: getChildren() ignores string nodes

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:00:52 UTC 2016


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

js pushed a commit to branch master
in repository ltx.

commit f36fb30ee750830a97327ced99a90f44e291b6f9
Author: Astro <astro at spaceboyz.net>
Date:   Thu May 27 03:04:45 2010 +0200

    xml: getChildren() ignores string nodes
---
 lib/xmpp/xml.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/xmpp/xml.js b/lib/xmpp/xml.js
index 531ea19..3e99423 100644
--- a/lib/xmpp/xml.js
+++ b/lib/xmpp/xml.js
@@ -58,7 +58,8 @@ Element.prototype.getChild = function(name, xmlns) {
 Element.prototype.getChildren = function(name, xmlns) {
     var result = [];
     this.children.forEach(function(child) {
-	if (child.getName() == name &&
+	if (child.getName &&
+	    child.getName() == name &&
 	    (!xmlns || child.getNS() == xmlns))
 	    result.push(child);
     });

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



More information about the Pkg-javascript-commits mailing list