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:
parent
5fb465802b
commit
162741a7cc
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user