Altered initialisation flow to ensure base state is correct for checking update status
This commit is contained in:
parent
ea458639b3
commit
00d2bc4f6d
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { goto, beforeUrlChange, route } from "@roxi/routify"
|
||||
import { goto, beforeUrlChange } from "@roxi/routify"
|
||||
import {
|
||||
Icon,
|
||||
Select,
|
||||
|
@ -45,11 +45,21 @@
|
|||
let saveId
|
||||
let currentTab = "JSON"
|
||||
let saveModal
|
||||
let queryStr = JSON.stringify(query)
|
||||
let override = false
|
||||
|
||||
let navigateTo = null
|
||||
|
||||
// seed the transformer
|
||||
if (query && !query.transformer) {
|
||||
query.transformer = "return data"
|
||||
}
|
||||
|
||||
// initialise a new empty schema
|
||||
if (query && !query.schema) {
|
||||
query.schema = {}
|
||||
}
|
||||
|
||||
let queryStr = JSON.stringify(query)
|
||||
|
||||
$beforeUrlChange((event, targetRoute) => {
|
||||
const updated = JSON.stringify(query)
|
||||
|
||||
|
@ -85,11 +95,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// seed the transformer
|
||||
if (query && !query.transformer) {
|
||||
query.transformer = "return data"
|
||||
}
|
||||
|
||||
function resetDependentFields() {
|
||||
if (query.fields.extra) {
|
||||
query.fields.extra = {}
|
||||
|
|
Loading…
Reference in New Issue