Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
next(() => {
if (docSnapshot.exists) {
const payload = parseDocSnapshot(type, docSnapshot);
const normalizedPayload = this.normalize(type.modelName, payload);
this.push(normalizedPayload);
} else {
this.unloadRecordUsingModelNameAndId(type.modelName, docRef.id);
}
});
}, () => {