mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
Merge f1e67886d5 into 472daf9c91
This commit is contained in:
commit
2af8d0ec92
@ -221,8 +221,14 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
LoadData: function () {
|
LoadData: function () {
|
||||||
if (this.DataToLoad !== '') {
|
if (this.DataToLoad !== '') {
|
||||||
this.$store.commit('SetSerializedState', this.DataToLoad)
|
try {
|
||||||
alert('Data Loaded!')
|
assertDataIsValid(this.DataToLoad);
|
||||||
|
this.$store.commit('SetSerializedState', this.DataToLoad)
|
||||||
|
alert('Data Loaded!')
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Invalid data string');
|
||||||
|
alert('Error loading data.')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ConfirmDelete: function () {
|
ConfirmDelete: function () {
|
||||||
@ -236,6 +242,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function assertDataIsValid(data) {
|
||||||
|
JSON.parse(atob(data));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user