Added extra field check for done in firebase function
This commit is contained in:
parent
09555aeadf
commit
2eeed6b287
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ export const pendingTasksUpdater: functions.CloudFunction<functions.Change<Fireb
|
||||||
if (change.after.exists && change.before.exists) {
|
if (change.after.exists && change.before.exists) {
|
||||||
/// Exit the funciton if case this is an update operation and the
|
/// Exit the funciton if case this is an update operation and the
|
||||||
/// event and priority of the taks haven't changed.
|
/// event and priority of the taks haven't changed.
|
||||||
if (before.get('priority') === after.get('priority') || before.get('event') === after.get('event')) {
|
if (before.get('priority') === after.get('priority') || before.get('event') === after.get('event') || before.get('done') === after.get('done')) {
|
||||||
console.log('Nothing to update, exiting function');
|
console.log('Nothing to update, exiting function');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue