fix selectAsset
This commit is contained in:
parent
f575edc9f3
commit
bd1424acff
1 changed files with 10 additions and 4 deletions
|
@ -1,7 +1,13 @@
|
||||||
export const selectAsset = (show) => {
|
export const selectAsset = show => {
|
||||||
const request = show.requestList[show.request.id];
|
const requestId = show.request.id;
|
||||||
const assetKey = request.key;
|
let asset;
|
||||||
return show.assetList[assetKey];
|
const request = show.requestList[requestId] || null;
|
||||||
|
const assetList = show.assetList;
|
||||||
|
if (request && assetList) {
|
||||||
|
const assetKey = request.key; // note: just store this in the request
|
||||||
|
asset = assetList[assetKey] || null;
|
||||||
|
}
|
||||||
|
return asset;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const selectShowState = (state) => {
|
export const selectShowState = (state) => {
|
||||||
|
|
Loading…
Reference in a new issue