From 96bcb64fbaf6587b6bd1539c87ffe50e38758171 Mon Sep 17 00:00:00 2001 From: Jake Fried Date: Thu, 6 May 2021 10:34:40 -0400 Subject: [PATCH] runtime: allow for iterator polyfill --- .../eslint-rules/no-for-of-statement.js | 24 ------------------- src/service/resources-impl.js | 4 ++-- 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 build-system/eslint-rules/no-for-of-statement.js diff --git a/build-system/eslint-rules/no-for-of-statement.js b/build-system/eslint-rules/no-for-of-statement.js deleted file mode 100644 index e1ed87e5b46b5..0000000000000 --- a/build-system/eslint-rules/no-for-of-statement.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2016 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use strict'; - -module.exports = function (context) { - return { - ForOfStatement: function (node) { - context.report({node, message: 'No for-of statement allowed.'}); - }, - }; -}; diff --git a/src/service/resources-impl.js b/src/service/resources-impl.js index 73bb3ad0391e6..1c4f87a69aad4 100644 --- a/src/service/resources-impl.js +++ b/src/service/resources-impl.js @@ -516,11 +516,11 @@ export class ResourcesImpl { resource.updateLayoutPriority(newLayoutPriority); // Update affected tasks - this.queue_.forEach((task) => { + for (let task of this.queue_) { if (task.resource == resource) { task.priority = newLayoutPriority; } - }); + } this.schedulePass(); }