From 52b25e49ab11be3417183dac175bf74214a84879 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Wed, 18 Jul 2018 10:00:50 -0700 Subject: [PATCH] Fix lint warnings --- test/unit/strict-template-policy.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/unit/strict-template-policy.html b/test/unit/strict-template-policy.html index bfb697dc32..5720829f7f 100644 --- a/test/unit/strict-template-policy.html +++ b/test/unit/strict-template-policy.html @@ -94,24 +94,22 @@ // Safari errors are thrown on the top window, sometimes not, so // catch in both places let uncaughtError = null; - const onerror = window.onerror; - const topOnerror = window.top.topOnerror; window.onerror = window.top.onerror = function(err) { if (!uncaughtError) { uncaughtError = new Error(err); } - } + }; assert.throws(function() { fn(); // Re-throw any uncaughtErrors let err; - if (err = (uncaughtError || window.uncaughtError)) { + if ((err = (uncaughtError || window.uncaughtError))) { throw new Error(err.message); } // Force polyfill reactions and/or async template stamping Polymer.flush(); // Re-throw any uncaughtErrors - if (err = (uncaughtError || window.uncaughtError)) { + if ((err = (uncaughtError || window.uncaughtError))) { throw new Error(err.message); } }, re);