ソースを参照

Protect against malformed results

Sebastien Lebreton 5 年 前
コミット
5b986140e6
1 ファイル変更3 行追加0 行削除
  1. 3 0
      Playground/js/monacoCreator.js

+ 3 - 0
Playground/js/monacoCreator.js

@@ -82,6 +82,9 @@ class MonacoCreator {
             return hooked
                 .apply(this, [model, position, context, token])
                 .then(result => {
+                    if (!result.suggestions)
+                        return result;
+
                     return { suggestions: result.suggestions.filter(suggestionFilter)};
                 });
         }