Skip to content

Commit

Permalink
Fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jul 18, 2018
1 parent f11b1a1 commit 52b25e4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/unit/strict-template-policy.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 52b25e4

Please sign in to comment.