@microsoft/applicationinsights-channel-js 3.0.0-beta.2208-16 → 3.0.0-beta.2209-01

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/Sender.ts CHANGED
@@ -218,9 +218,17 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
218
218
  _evtNamespace = mergeEvtNamespace(createUniqueNamespace("Sender"), core.evtNamespace && core.evtNamespace());
219
219
  _offlineListener = createOfflineListener(_evtNamespace);
220
220
 
221
+ // TODO v3.x: Change the ISenderConfig to not be function calls
221
222
  const defaultConfig = _getDefaultAppInsightsChannelConfig();
222
223
  objForEachKey(defaultConfig, (field, value) => {
223
- _self._senderConfig[field] = () => ctx.getConfig(identifier, field, value());
224
+ _self._senderConfig[field] = () => {
225
+ let theValue = ctx.getConfig(identifier, field, value())
226
+ if (!theValue && field === "endpointUrl") {
227
+ // Use the default value (handles empty string in the configuration)
228
+ theValue = value();
229
+ }
230
+ return theValue;
231
+ }
224
232
  });
225
233
 
226
234
  _self._buffer = (_self._senderConfig.enableSessionStorageBuffer() && utlCanUseSessionStorage())