mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix config editor file.path
This commit is contained in:
2 files changed
+3
-9
No files matched your search
@@ -148,7 +148,7 @@ export default function ConfigEditor({
|
||||
// FIXME: Otherwise first form change will be ignored
|
||||
React.useEffect(() => {
|
||||
setTimeout(() => {
|
||||
updateFromMonaco(`${stringConfig}\n\ndummy: 1`);
|
||||
updateFromMonaco(stringConfig === '{}' ? 'dummy: 1' : `${stringConfig}\n\ndummy: 1`);
|
||||
setTimeout(() => {
|
||||
setStringConfig(stringConfig);
|
||||
setValue(yaml.load(stringConfig));
|
||||
|
||||
Reference in new issue
Block a user