Cleanup: use destructuring assignment

For multiple return values use

 let [val1, val2, val3] = function();

Rather than:

 temp = function();
 val1 = temp[0];
 ...

svn path=/trunk/; revision=149
This commit is contained in:
Owen Taylor 2009-01-16 20:40:16 +00:00
parent 8db3685e29
commit ac6a5ef4af

View File

@ -65,11 +65,7 @@ DocDisplayItem.prototype = {
// Opens a document represented by this display item. // Opens a document represented by this display item.
launch : function() { launch : function() {
let appName = this._docInfo.last_application(); let appName = this._docInfo.last_application();
let appData = this._docInfo.get_application_info(appName); let [success, appExec, count, time] = this._docInfo.get_application_info(appName);
let success = appData[0];
let appExec = appData[1];
let count = appData[2];
let time = appData[3];
if (success) { if (success) {
log("Will open a document with the following command: " + appExec); log("Will open a document with the following command: " + appExec);
// TODO: Change this once better support for creating GAppInfo is added to // TODO: Change this once better support for creating GAppInfo is added to