mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Fix the player settings page generating yaml files with string keys containing integers
This commit is contained in:
@@ -147,7 +147,7 @@ const getSettingValue = (settings, keyString) => {
|
||||
const exportSettings = () => {
|
||||
const presetNumber = document.getElementById('preset-number').value;
|
||||
const settings = JSON.parse(localStorage.getItem(`playerSettings${presetNumber}`));
|
||||
const yamlText = jsyaml.safeDump(settings);
|
||||
const yamlText = jsyaml.safeDump(settings, { noCompatMode: true }).replaceAll(/'(\d+)':/g, (x, y) => `${y}:`);
|
||||
download(`${settings.description}.yaml`, yamlText);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user