mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fix(worker-html) addAttributesToElement: attributes could be undefined
This commit is contained in:
parent
13d11d79cf
commit
7b2423fe3d
1 changed files with 3 additions and 2 deletions
|
|
@ -7644,8 +7644,9 @@ function getAttribute(node, name) {
|
|||
SAXTreeBuilder.prototype.addAttributesToElement = function(element, attributes) {
|
||||
for (var i = 0; i < attributes.length; i++) {
|
||||
var attribute = attributes[i];
|
||||
if (!getAttribute(element, attribute.nodeName))
|
||||
element.attributes.push(attribute);
|
||||
if (element.attributes)
|
||||
if (!getAttribute(element, attribute.nodeName))
|
||||
element.attributes.push(attribute);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue