@momo2555/koppeliajs 0.0.172 → 0.0.173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/koppelia.js +2 -5
- package/package.json +1 -1
package/dist/scripts/koppelia.js
CHANGED
|
@@ -303,11 +303,8 @@ export class Koppelia {
|
|
|
303
303
|
getCurrentPlaysRequest.setRequest("getCurrentPlays");
|
|
304
304
|
getCurrentPlaysRequest.setDestination(PeerType.MASTER, "");
|
|
305
305
|
this._console.sendMessage(getCurrentPlaysRequest, (response) => {
|
|
306
|
-
let playsRawList = response.getParam("plays",
|
|
307
|
-
let plays =
|
|
308
|
-
for (let playId in playsRawList) {
|
|
309
|
-
plays.push(new Play(this._console, playId, playsRawList[playId]));
|
|
310
|
-
}
|
|
306
|
+
let playsRawList = response.getParam("plays", []);
|
|
307
|
+
let plays = playsRawList.map((playData) => new Play(this._console, playData.id, playData));
|
|
311
308
|
resolve(plays);
|
|
312
309
|
});
|
|
313
310
|
});
|