You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The public unregisterSuperProperty method in the Mixpanel instance calls an internal asynchronous function (unregisterSuperProperty), but it is handled synchronously. When making multiple calls to unregister super properties, only the first property gets removed, and subsequent properties are missed.
Usage Example
// Example of unregistering multiple super properties
const mixpanelInstance = getMixpanelInstance(); // Assume a Mixpanel instance is initialized
mixpanelInstance.unregisterSuperProperty('property1');
mixpanelInstance.unregisterSuperProperty('property2');
mixpanelInstance.unregisterSuperProperty('property3');
Related Instance Function
unregisterSuperProperty(propertyName) {
if (!StringHelper.isValid(propertyName)) {
StringHelper.raiseError(PARAMS.PROPERTY_NAME);
}
this.mixpanelImpl.unregisterSuperProperty(this.token, propertyName);
}
Internal Function
async unregisterSuperProperty(token, propertyName) {
MixpanelLogger.log(token, `Unregister super property '${propertyName}'`);
let superProperties = this.mixpanelPersistent.getSuperProperties(token);
delete superProperties[propertyName];
this._updateSuperProperties(token, superProperties);
MixpanelLogger.log(token, `Updated Super Properties:`, superProperties);
}
Expected Behavior:
All specified properties should be unregistered when calling unregisterSuperProperty multiple times.
Actual Behavior:
Only the first property is unregistered, and subsequent properties are not removed.
Suggested Enhancement:
Allow unregisterSuperProperty to optionally accept an array of property names and unregister them in a single call.
The text was updated successfully, but these errors were encountered:
davidtiede
changed the title
Make unregisterSuperProperty async (to mimic
Bug: unregisterSuperProperty only removes the first property when called multiple times
Sep 26, 2024
Description:
The public
unregisterSuperProperty
method in the Mixpanel instance calls an internal asynchronous function (unregisterSuperProperty), but it is handled synchronously. When making multiple calls to unregister super properties, only the first property gets removed, and subsequent properties are missed.Usage Example
Related Instance Function
Internal Function
Expected Behavior:
All specified properties should be unregistered when calling
unregisterSuperProperty
multiple times.Actual Behavior:
Only the first property is unregistered, and subsequent properties are not removed.
Suggested Enhancement:
Allow
unregisterSuperProperty
to optionally accept an array of property names and unregister them in a single call.The text was updated successfully, but these errors were encountered: