runDialog: catch the case where no completion is available
Just return null, instead of failing with an exception later trying to call substr() on null. https://bugzilla.gnome.org/show_bug.cgi?id=735062
This commit is contained in:
parent
d0fe1211f2
commit
d54efe0838
@ -182,6 +182,10 @@ const RunDialog = new Lang.Class({
|
|||||||
let results = someResults.reduce(function(a, b) {
|
let results = someResults.reduce(function(a, b) {
|
||||||
return a.concat(b);
|
return a.concat(b);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
if (!results.length)
|
||||||
|
return null;
|
||||||
|
|
||||||
let common = results.reduce(_getCommon, null);
|
let common = results.reduce(_getCommon, null);
|
||||||
return common.substr(text.length);
|
return common.substr(text.length);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user