Bug 1201017 - Remove array.includes() usage in nsBrowserGlue's urlbar telemetry. r=ttaubert

This commit is contained in:
Drew Willcoxon 2015-09-02 11:44:20 -07:00
parent 2905771b59
commit fbd81f97df

View File

@ -530,8 +530,8 @@ BrowserGlue.prototype = {
action.type;
}
if (!actionType) {
let styles = controller.getStyleAt(idx).split(/\s+/);
let style = ["autofill", "tag", "bookmark"].find(s => styles.includes(s));
let styles = new Set(controller.getStyleAt(idx).split(/\s+/));
let style = ["autofill", "tag", "bookmark"].find(s => styles.has(s));
actionType = style || "history";
}