Skip to content

Commit

Permalink
Node.js: fix creation of initial tiles
Browse files Browse the repository at this point in the history
Make sure we create an Array before calling concat or map. Could also use Array.from, but this matches commit edc46a0
  • Loading branch information
tronical authored Mar 31, 2024
1 parent edc46a0 commit ef9fa27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/memory/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as slint from "slint-ui";
let ui = slint.loadFile("memory.slint");
let window = new ui.MainWindow();

let initial_tiles = window.memory_tiles;
let initial_tiles = [...window.memory_tiles];
let tiles = initial_tiles.concat(initial_tiles.map((tile) => Object.assign({}, tile)));

for (let i = tiles.length - 1; i > 0; i--) {
Expand Down

0 comments on commit ef9fa27

Please sign in to comment.