We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ff0a2d commit 039c631Copy full SHA for 039c631
amplitude.js
@@ -123,10 +123,12 @@ var Amplitude = function() {
123
124
Amplitude.prototype.getInstance = function(instance) {
125
instance = instance || DEFAULT_INSTANCE;
126
- if (!this._instances.hasOwnProperty(instance)) {
127
- this._instances[instance] = new AmplitudeClient();
+ var client = this._instances[instance];
+ if (client === undefined) {
128
+ client = new AmplitudeClient();
129
+ this._instances[instance] = client;
130
}
- return this._instances[instance];
131
+ return client;
132
};
133
134
Amplitude.prototype.Identify = Identify;
0 commit comments