diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-11-27 12:10:21 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-11-27 12:10:21 -0600 |
| commit | 35b057d4a8ccddbbe5d4385f8829fef78c76e233 (patch) | |
| tree | d1bd6322c5d7147dd18dcdfadd91132338368eef /src/web | |
| parent | 36e0fc96988d2e37fd7e6b2041c8669cac360496 (diff) | |
| download | slskd-35b057d4a8ccddbbe5d4385f8829fef78c76e233.tar.gz | |
simplify yaml parsing, fix null display
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/components/System/Options/View.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/web/src/components/System/Options/View.js b/src/web/src/components/System/Options/View.js index 61651f8d..c3a62214 100644 --- a/src/web/src/components/System/Options/View.js +++ b/src/web/src/components/System/Options/View.js @@ -1,5 +1,5 @@ import React from 'react'; -import yaml from 'yaml'; +import YAML from 'yaml'; import { Icon, Button } from 'semantic-ui-react'; import CodeEditor from './CodeEditor'; @@ -7,10 +7,7 @@ import CodeEditor from './CodeEditor'; const View = ({ options, editAction }) => { const { remoteConfiguration } = options; - const doc = new yaml.Document(); - doc.contents = options; - - const optionsAsYaml = doc.toString(); + const optionsAsYaml = YAML.stringify(options, { simpleKeys: true }) return ( <> |
