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 9c3e48627a
commit f0eb4d4175

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";
}