Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend - AssetPage - Direct-to-page Navigations Fails #3

Open
mtralka opened this issue May 15, 2022 · 0 comments
Open

Frontend - AssetPage - Direct-to-page Navigations Fails #3

mtralka opened this issue May 15, 2022 · 0 comments
Assignees

Comments

@mtralka
Copy link
Owner

mtralka commented May 15, 2022

If assetStore.getCurrentAsset is undefined, the proper asset will not currently be fetched from the backend. Additionally, we want to validate that the currentAsset.id is the same as the route id. If not, we should fetch from the api again.

A template placeholder for testing - see below - is in place

if (!assetStore.getCurrentAsset) {
// pull from url
console.log('undefinde');
assetStore.setCurrentAssetById(assetId);
} else if (assetStore.getCurrentAsset.id != assetId) {
// pull from URL
console.log('mismatch');
assetStore.setCurrentAssetById(assetId);

@mtralka mtralka self-assigned this May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant