From be72ff6c01d2a19231fa1e40f272dcf6fa8754d9 Mon Sep 17 00:00:00 2001 From: kg0816 <211191696+kg0816@users.noreply.github.com> Date: Fri, 21 Nov 2025 22:38:02 +0900 Subject: [PATCH] fix: convert board data to numbers before saving --- src/iframe/life-game.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iframe/life-game.js b/src/iframe/life-game.js index 0daea76..49f8a32 100644 --- a/src/iframe/life-game.js +++ b/src/iframe/life-game.js @@ -283,7 +283,8 @@ on.place_template = (template) => { }; on.save_board = async () => { - window.parent.postMessage({ type: "save_board", data: board }, "*"); + const numericBoard = board.map((row) => row.map((cell) => (cell ? 1 : 0))); + window.parent.postMessage({ type: "save_board", data: numericBoard }, "*"); }; on.apply_board = (newBoard) => {