Skip to content

Commit

Permalink
make targetPlatform undefind
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Apr 7, 2024
1 parent de1bd19 commit 4be33c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tiappxml.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const xml = appc.xml;
const __ = appc.i18n(__dirname).__;

const defaultDOMParserArgs = { errorHandler: function () {} };
let targetPlatform = '';
let targetPlatform;
module.exports = tiapp;

function toXml(dom, parent, name, value) {
Expand Down Expand Up @@ -818,7 +818,7 @@ function toJS(obj, doc) {
break;

case 'id':
if (xml.getAttr(node, 'platform') === targetPlatform || obj[node.tagName] === undefined) {
if ((targetPlatform && xml.getAttr(node, 'platform') === targetPlatform) || obj[node.tagName] === undefined) {
obj[node.tagName] = '' + xml.getValue(node);
if (typeof obj[node.tagName] === 'string') {
obj[node.tagName] = obj[node.tagName].replace(/\n/g, '');
Expand Down

0 comments on commit 4be33c7

Please sign in to comment.