@tsuzuri-lab/sed-language-server 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/syntax-profile.js +4 -8
package/package.json
CHANGED
package/src/syntax-profile.js
CHANGED
|
@@ -29,22 +29,18 @@ function invalidOption(code, option, received, expected, message) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export function resolveSyntaxProfile(options) {
|
|
32
|
-
if (options === undefined) {
|
|
32
|
+
if (options === undefined || options === null) {
|
|
33
33
|
return successfulResult(defaultSyntaxProfile);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
if (
|
|
37
|
-
options === null ||
|
|
38
|
-
typeof options !== "object" ||
|
|
39
|
-
Array.isArray(options)
|
|
40
|
-
) {
|
|
36
|
+
if (typeof options !== "object" || Array.isArray(options)) {
|
|
41
37
|
return failedResult([
|
|
42
38
|
invalidOption(
|
|
43
39
|
"syntax-profile-invalid-options",
|
|
44
40
|
null,
|
|
45
41
|
options,
|
|
46
|
-
"
|
|
47
|
-
"Syntax profile options must be provided as
|
|
42
|
+
"an options object or null",
|
|
43
|
+
"Syntax profile options must be provided as an object or null.",
|
|
48
44
|
),
|
|
49
45
|
]);
|
|
50
46
|
}
|