From cb42274a4655a0de7b57edc75b6b29d05f947f57 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 21 Dec 2015 02:25:59 +1100 Subject: [PATCH] Fall back to String#contains when #includes is not supported. Changeover was FF40. --- common/modules/polyfill.jsm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/modules/polyfill.jsm b/common/modules/polyfill.jsm index a18acc43..829d7ef8 100644 --- a/common/modules/polyfill.jsm +++ b/common/modules/polyfill.jsm @@ -67,4 +67,8 @@ for (let [i, value] of this.entries()) yield value; }; + + if (!String.prototype.includes) + String.prototype.includes = String.prototype.contains; + }