diff options
author | Ayush Rawal <royalrawal.2001@gmail.com> | 2021-09-11 11:06:09 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-09-15 00:07:34 +0300 |
commit | b807cd62eabe337e3243415c9870ea36d9289e12 (patch) | |
tree | cb54fb077bd4fd016bcb844db98d2eb58f19a6ec /lib/search | |
parent | b4aac345b0a7cdec4d713c5be4daea37330b2b26 (diff) |
fix(search): return valid json for no results
PR-URL: https://github.com/npm/cli/pull/3738
Credit: @AyushRawal
Close: #3738
Reviewed-by: @wraithgar
Diffstat (limited to 'lib/search')
-rw-r--r-- | lib/search/format-package-stream.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/search/format-package-stream.js b/lib/search/format-package-stream.js index c88df5eb4..fb7d81856 100644 --- a/lib/search/format-package-stream.js +++ b/lib/search/format-package-stream.js @@ -42,7 +42,7 @@ class JSONOutputStream extends Minipass { } end () { - super.write(this._didFirst ? ']\n' : '\n]\n') + super.write(this._didFirst ? ']\n' : '\n[]\n') super.end() } } |