From c768a71656f1289e90724500f84fbf8713b35668 Mon Sep 17 00:00:00 2001 From: David Tsay Date: Fri, 31 Mar 2023 15:43:45 -0700 Subject: [PATCH] free `findSubscriptionProvider` --- src/api/telemetry/TelemetryAPI.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api/telemetry/TelemetryAPI.js b/src/api/telemetry/TelemetryAPI.js index 71a7457062..f247d150da 100644 --- a/src/api/telemetry/TelemetryAPI.js +++ b/src/api/telemetry/TelemetryAPI.js @@ -88,7 +88,7 @@ export default class TelemetryAPI { * @memberof module:openmct.TelemetryAPI~TelemetryProvider# */ canProvideTelemetry(domainObject) { - return Boolean(this.#findSubscriptionProvider(domainObject)) + return Boolean(this.findSubscriptionProvider(domainObject)) || Boolean(this.findRequestProvider(domainObject)); } @@ -123,9 +123,10 @@ export default class TelemetryAPI { } /** - * @private + * Returns a telemetry subscription provider that supports + * a given domain object and options. */ - #findSubscriptionProvider() { + findSubscriptionProvider() { const args = Array.prototype.slice.apply(arguments); function supportsDomainObject(provider) { return provider.supportsSubscribe.apply(provider, args); @@ -348,7 +349,7 @@ export default class TelemetryAPI { return () => {}; } - const provider = this.#findSubscriptionProvider(domainObject); + const provider = this.findSubscriptionProvider(domainObject); if (!this.subscribeCache) { this.subscribeCache = {};