From 3aea44f84023e8e6369d28a57c3509468456d3a1 Mon Sep 17 00:00:00 2001 From: Victor Elci Date: Thu, 16 Feb 2023 16:51:34 -0500 Subject: [PATCH] Ensure metrics adapters have owners to fix di (#541) --- addon/services/metrics.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addon/services/metrics.js b/addon/services/metrics.js index 8af04f6b..1ef770d4 100644 --- a/addon/services/metrics.js +++ b/addon/services/metrics.js @@ -1,7 +1,7 @@ import Service from '@ember/service'; import { assert } from '@ember/debug'; import { dasherize } from '@ember/string'; -import { getOwner } from '@ember/application'; +import { getOwner, setOwner } from '@ember/application'; export default class Metrics extends Service { /** @@ -154,6 +154,7 @@ export default class Metrics extends Service { */ _activateAdapter({ adapterClass, config }) { const adapter = new adapterClass(config); + setOwner(adapter, getOwner(this)); adapter.install(); return adapter; }