diff --git a/core/computed/metrics/lantern-metric.js b/core/computed/metrics/lantern-metric.js index 9142c6f66cf3..03ab17ac5872 100644 --- a/core/computed/metrics/lantern-metric.js +++ b/core/computed/metrics/lantern-metric.js @@ -19,9 +19,7 @@ class LanternMetric extends Metric { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - // TODO: remove this fallback when lighthouse-pub-ads plugin can update. - const gatherContext = data.gatherContext || {gatherMode: 'navigation'}; - if (gatherContext.gatherMode !== 'navigation') { + if (data.gatherContext.gatherMode !== 'navigation') { throw new Error(`Lantern metrics can only be computed on navigations`); } diff --git a/core/computed/metrics/metric.js b/core/computed/metrics/metric.js index 5a483bdda636..4133876f027b 100644 --- a/core/computed/metrics/metric.js +++ b/core/computed/metrics/metric.js @@ -61,9 +61,7 @@ class Metric { * @return {Promise} */ static async compute_(data, context) { - // TODO: remove this fallback when lighthouse-pub-ads plugin can update. - const gatherContext = data.gatherContext || {gatherMode: 'navigation'}; - const {trace, devtoolsLog, settings} = data; + const {trace, devtoolsLog, settings, gatherContext} = data; if (!trace || !devtoolsLog || !settings) { throw new Error('Did not provide necessary metric computation data'); }