Skip to content

Commit

Permalink
handle null
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Jan 31, 2025
1 parent c6adb56 commit 2bfff41
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class BatchedActivityService {
*/
onUrlData(cb) {
return this.urlService.onData((params) => {
if ('patch' in params.data) return console.log('ignoring patch');
if ('patch' in params.data && params.data.patch !== null) return console.log('ignoring patch');
cb(params);
});
}
Expand All @@ -130,7 +130,7 @@ export class BatchedActivityService {
*/
onPatchData() {
return this.urlService.onData((params) => {
if (!('patch' in params.data)) return console.log('ignoring none-patch');
if (!('patch' in params.data && params.data.patch !== null)) return console.log('ignoring none-patch');
this.dataService.publish({ activity: [/** @type {DomainActivity} */ (params.data.patch)] });
});
}
Expand Down

0 comments on commit 2bfff41

Please sign in to comment.