提交 151ba0b0 编写于 作者: M Matt Bierner

Don't try parsing `undefined` as json

Fixes #45804
上级 22f49f8c
......@@ -192,7 +192,9 @@ export class SuggestMemories {
try {
const raw = this._storageService.get(`${this._storagePrefix}/${this._mode}`, StorageScope.WORKSPACE);
this._strategy.fromJSON(JSON.parse(raw));
if (raw) {
this._strategy.fromJSON(JSON.parse(raw));
}
} catch (e) {
// things can go wrong with JSON...
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册