Commit 96701211 authored by schneider210's avatar schneider210
Browse files

bugfix: json_parse in content.vue finally fixed without catch

parent 699d6427
Pipeline #132443 passed with stages
in 3 minutes and 23 seconds
......@@ -12,8 +12,8 @@
<q-page-container>
<router-view
:collection="collection"
:contenturl="contenturl"
:imageurl="imageurl"
:itemurl="itemurl"
:language="itemlanguage"
:manifests="manifests"
:pagelabel="pagelabel"
......
......@@ -6,7 +6,7 @@
export default {
name: 'Content',
props: {
itemurl: String,
contenturl: String,
manifests: Array,
request: Function,
},
......@@ -32,17 +32,8 @@ export default {
}
},
},
created() {
this.request(this.itemurl)
.then((data) => {
this.request(data.content, 'text')
.then((content) => {
this.content = content;
});
})
.catch(() => {
// nested async request. promise is pending, so JSON_parse fails
});
async created() {
this.content = await this.request(this.contenturl, 'text').then((data) => data);
},
mounted() {
this.$root.$on('update-sequence-index', (index) => {
......
......@@ -19,8 +19,8 @@
<q-separator />
<Content
:key="itemurl"
:itemurl="itemurl"
:key="contenturl"
:contenturl="contenturl"
:manifests="manifests"
:request="request"
>
......@@ -78,8 +78,8 @@ export default {
},
props: {
collection: Object,
contenturl: String,
imageurl: String,
itemurl: String,
language: String,
manifests: Array,
pagelabel: String,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment