mirror of https://github.com/embarklabs/embark.git
fix: don't eval function calls for suggestions (#1382)
This commit is contained in:
parent
78201ce9df
commit
73a06725ac
|
@ -92,7 +92,10 @@ export default class Suggestions {
|
|||
}
|
||||
|
||||
public getSuggestions(cmd: string, cb: (results: SuggestionsList) => any) {
|
||||
// Don't bother returning suggestions for empty commands or for
|
||||
// commands that already have `(` or `)` to avoid executing code
|
||||
if (cmd === "") { return cb([]); }
|
||||
if (cmd.indexOf("(") !== -1 || cmd.indexOf(")") !== -1) { return cb([]); }
|
||||
|
||||
const suggestions = this.suggestions;
|
||||
|
||||
|
|
Loading…
Reference in New Issue