File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const backwardCompatibility = (block) => {
11
11
} else if ( block . getAttribute ( 'type' ) === 'on_finish' ) {
12
12
block . setAttribute ( 'type' , 'after_purchase' )
13
13
}
14
- for ( const statement of block . getElementsByTagName ( 'statement' ) ) {
14
+ for ( const statement of Array . prototype . slice . call ( block . getElementsByTagName ( 'statement' ) ) ) {
15
15
if ( statement . getAttribute ( 'name' ) === 'STRATEGY_STACK' ) {
16
16
statement . setAttribute ( 'name' , 'BEFOREPURCHASE_STACK' )
17
17
} else if ( statement . getAttribute ( 'name' ) === 'FINISH_STACK' ) {
@@ -193,7 +193,7 @@ export default class _Blockly {
193
193
}
194
194
loadWorkspace ( xml ) {
195
195
Blockly . mainWorkspace . clear ( )
196
- for ( const block of xml . children ) {
196
+ for ( const block of Array . prototype . slice . call ( xml . children ) ) {
197
197
backwardCompatibility ( block )
198
198
}
199
199
Blockly . Xml . domToWorkspace ( xml , Blockly . mainWorkspace )
@@ -204,7 +204,7 @@ export default class _Blockly {
204
204
}
205
205
loadBlocks ( xml ) {
206
206
const addedBlocks = [ ]
207
- for ( const block of xml . children ) {
207
+ for ( const block of Array . prototype . slice . call ( xml . children ) ) {
208
208
addedBlocks . push ( this . addDomBlocks ( block ) )
209
209
}
210
210
cleanUp ( addedBlocks )
You can’t perform that action at this time.
0 commit comments