From 4caf620a294c2ab9d9a15a90dd0e99bde66ca17b Mon Sep 17 00:00:00 2001 From: IronBlood Date: Thu, 9 May 2024 14:43:05 +0800 Subject: [PATCH] fix: add the missing index of `attributes` --- src/io/p5.XML.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/p5.XML.js b/src/io/p5.XML.js index 430716f36c..39856fbd1b 100644 --- a/src/io/p5.XML.js +++ b/src/io/p5.XML.js @@ -173,7 +173,7 @@ p5.XML = class { const newDOM = xmlDoc.createElement(name); newDOM.innerHTML = content; for (let i = 0; i < attributes.length; i++) { - newDOM.setAttribute(attributes[i].nodeName, attributes.nodeValue); + newDOM.setAttribute(attributes[i].nodeName, attributes[i].nodeValue); } this.DOM = newDOM; }