@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsuzuri-lab/sed-language-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Language server for POSIX sed with opt-in GNU syntax support.",
5
5
  "keywords": [
6
6
  "sed",
@@ -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
- "a non-null options object",
47
- "Syntax profile options must be provided as a non-null object.",
42
+ "an options object or null",
43
+ "Syntax profile options must be provided as an object or null.",
48
44
  ),
49
45
  ]);
50
46
  }