Skip to content

Commit

Permalink
另一个接口也加上自旋
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Nov 20, 2024
1 parent 767aa18 commit cad65c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/editorTable/editorTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,11 @@ export function openTable<N extends Table.NameCN>(tableName: N): EditorTable<N>
}

export async function getAllObjects() {
let map = y3.env.currentMap!;
let map = y3.env.currentMap;
while (!map || !map.editorTable) {
await y3.sleep(100);
map = y3.env.currentMap;
}
return await map.editorTable.getAllObjects();
}

Expand Down

0 comments on commit cad65c8

Please sign in to comment.