Skip to content

Commit c31b133

Browse files
McSamMcSam
authored andcommitted
eslint & resolve changes
1 parent 47d1bf0 commit c31b133

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/botPage/view/blockly/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export default class _Blockly {
321321
const xmlDoc = new DOMParser().parseFromString(blockStr, 'application/xml');
322322

323323
if (xmlDoc.getElementsByTagName('parsererror').length) {
324-
throw 0;
324+
throw new Error();
325325
}
326326
} catch (err) {
327327
throw createErrorAndEmit('FileLoad', unrecognisedMsg());
@@ -344,7 +344,7 @@ export default class _Blockly {
344344
}
345345

346346
blocklyXml.forEach(block => {
347-
const blockType = block.attributes.type.nodeValue;
347+
const blockType = block.getAttribute('type');
348348

349349
if (!Object.keys(Blockly.Blocks).includes(blockType)) {
350350
throw createErrorAndEmit(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy