Only hydrate state from URL once in design section to avoid cycles
This commit is contained in:
parent
f631f67979
commit
37fe8c2ab6
|
@ -18,6 +18,7 @@
|
|||
let previousType
|
||||
let previousAsset
|
||||
let previousComponentId
|
||||
let hydrationComplete = false
|
||||
|
||||
// Hydrate state from URL params
|
||||
$: hydrateStateFromURL($params, $leftover)
|
||||
|
@ -30,6 +31,12 @@
|
|||
)
|
||||
|
||||
const hydrateStateFromURL = (params, leftover) => {
|
||||
if (hydrationComplete) {
|
||||
return
|
||||
} else {
|
||||
hydrationComplete = true
|
||||
}
|
||||
|
||||
// Do nothing if no asset type, as that means we've left the page
|
||||
if (!params.assetType) {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue