mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-16 14:40:50 -05:00
Fix "noStringLiteral" lint errors (#19310)
This commit is contained in:
@@ -84,9 +84,9 @@ function main(): void {
|
||||
|
||||
function xmlObjectToString(o: any) {
|
||||
const out: any = {};
|
||||
for (const item of o["LCX"]["Item"][0]["Item"][0]["Item"]) {
|
||||
let ItemId = item["$"]["ItemId"];
|
||||
let Val = item["Str"][0]["Tgt"] ? item["Str"][0]["Tgt"][0]["Val"][0] : item["Str"][0]["Val"][0];
|
||||
for (const item of o.LCX.Item[0].Item[0].Item) {
|
||||
let ItemId = item.$.ItemId;
|
||||
let Val = item.Str[0].Tgt ? item.Str[0].Tgt[0].Val[0] : item.Str[0].Val[0];
|
||||
|
||||
if (typeof ItemId !== "string" || typeof Val !== "string") {
|
||||
console.error("Unexpected XML file structure");
|
||||
|
||||
Reference in New Issue
Block a user