1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix multi-document support in monaco editor (#4756)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-01-27 07:13:41 -05:00 committed by GitHub
parent 5fb465802b
commit 162741a7cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import yaml, { YAMLException } from "js-yaml";
import yaml from "js-yaml";
export interface MonacoValidator {
(value: string): void;
@ -10,9 +10,9 @@ export interface MonacoValidator {
export function yamlValidator(value: string) {
try {
yaml.load(value);
yaml.loadAll(value);
} catch (error) {
throw String(error as YAMLException);
throw String(error);
}
}