ngx-segment-analytics icon indicating copy to clipboard operation
ngx-segment-analytics copied to clipboard

Unused `cdnUrl` variable in SegmentService

Open mfursov opened this issue 7 months ago • 0 comments

This code contains an unused variable (cdnUrl) and this may be a bug:

       if (this._config.loadOnInitialization && !SegmentService._segmentInstance.instance?.initialized) {
            if (this._config.segmentHost) {
                // Deprecated option
                const cdnUrl = 'https://' + this._config.segmentHost;
            } else {
                const cdnUrl = this._config.cdnURL;
            }

            this.load({writeKey: this._config.apiKey, cdnURL: this._config.segmentHost});
        }

mfursov avatar Jul 05 '24 19:07 mfursov