mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Check for invalid JSON
This commit is contained in:
+11
-4
@@ -10919,11 +10919,19 @@ speechSynthesis.getVoices();
|
|||||||
dynamic_bone_max_collider_check_count: { name: 'Dynamic Bones Limit Max Collider Collisions (0 disables all components)', default: '8' }
|
dynamic_bone_max_collider_check_count: { name: 'Dynamic Bones Limit Max Collider Collisions (0 disables all components)', default: '8' }
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.ReadVRChatConfigFile = async function () {
|
$app.methods.readVRChatConfigFile = async function () {
|
||||||
this.VRChatConfigFile = {};
|
this.VRChatConfigFile = {};
|
||||||
var config = await AppApi.ReadConfigFile();
|
var config = await AppApi.ReadConfigFile();
|
||||||
if (config) {
|
if (config) {
|
||||||
this.VRChatConfigFile = JSON.parse(config);
|
try {
|
||||||
|
this.VRChatConfigFile = JSON.parse(config);
|
||||||
|
} catch {
|
||||||
|
this.$message({
|
||||||
|
message: 'Invalid JSON in config.json',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
throw new Error('Invalid JSON in config.json');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -10932,7 +10940,6 @@ speechSynthesis.getVoices();
|
|||||||
AppApi.WriteConfigFile(json);
|
AppApi.WriteConfigFile(json);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
$app.data.VRChatConfigDialog = {
|
$app.data.VRChatConfigDialog = {
|
||||||
visible: false,
|
visible: false,
|
||||||
cameraRes: false,
|
cameraRes: false,
|
||||||
@@ -10944,7 +10951,7 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
|
|
||||||
$app.methods.showVRChatConfig = async function () {
|
$app.methods.showVRChatConfig = async function () {
|
||||||
await this.ReadVRChatConfigFile();
|
await this.readVRChatConfigFile();
|
||||||
this.$nextTick(() => adjustDialogZ(this.$refs.VRChatConfigDialog.$el));
|
this.$nextTick(() => adjustDialogZ(this.$refs.VRChatConfigDialog.$el));
|
||||||
this.VRChatConfigDialog = {
|
this.VRChatConfigDialog = {
|
||||||
cameraRes: false,
|
cameraRes: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user