diff options
| author | jc0b <j@jc0b.computer> | 2020-07-29 12:22:15 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:45 +0200 |
| commit | 0a984529480c08aaf6af9f6f657d4ed805e77d49 (patch) | |
| tree | 1dee4649b5897a1c1bc4aeab4f74a34a80f2c105 /frontend | |
| parent | cd93fc94b2bf4e7b10f168c7dd04a7affba60f33 (diff) | |
replaced yield calls()
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/src/sagas/objects.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/sagas/objects.js b/frontend/src/sagas/objects.js index 9c9b19b8..cc19eb75 100644 --- a/frontend/src/sagas/objects.js +++ b/frontend/src/sagas/objects.js @@ -149,7 +149,7 @@ export const updateTopologyOnServer = function* (id) { export const getTopologyAsObject = function* (id, keepIds) { const topologyStore = yield select(OBJECT_SELECTORS['topology']) - const rooms = yield call(getAllRooms, topologyStore[id].roomIds, keepIds) + const rooms = yield getAllRooms(topologyStore[id].roomIds, keepIds) return { _id: keepIds ? id : undefined, name: topologyStore[id].name, @@ -167,7 +167,7 @@ export const getAllRooms = function* (roomIds, keepIds) { for(let i in roomIds){ console.log("DEBUG: on iteration " + i + ", roomStore has value = " + roomStore[i]) - let tiles = yield call(getAllRoomTiles, roomStore[i], keepIds) + let tiles = yield getAllRoomTiles(roomStore[i], keepIds) rooms.push({ _id: keepIds ? i : undefined, name: roomStore[i].name, @@ -182,7 +182,7 @@ export const getAllRoomTiles = function* (roomStore, keepIds) { let tiles = [] console.log("DEBUG: roomStore = " + roomStore) for(let i in roomStore.tileIds){ - tiles.push(yield call(getTileById, roomStore.tileIds[i], keepIds)) + tiles.push(yield getTileById(roomStore.tileIds[i], keepIds)) } return tiles } @@ -195,7 +195,7 @@ export const getTileById = function* (id, keepIds) { positionY: tileStore[id].positionY, rack: !tileStore[id].rackId ? undefined - : yield call(getRackById, tileStore[id].rackId, keepIds), + : yield getRackById(tileStore[id].rackId, keepIds), } } |
