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 b778b31 commit c4aac33Copy full SHA for c4aac33
src/RestWrite.js
@@ -816,6 +816,15 @@ RestWrite.prototype.runDatabaseOperation = function() {
816
817
// Returns nothing - doesn't wait for the trigger.
818
RestWrite.prototype.runAfterTrigger = function() {
819
+ if (!this.response || !this.response.response) {
820
+ return;
821
+ }
822
+
823
+ // Avoid doing any setup for triggers if there is no 'afterSave' trigger for this class.
824
+ if (!triggers.triggerExists(this.className, triggers.Types.afterSave, this.config.applicationId)) {
825
+ return Promise.resolve();
826
827
828
var extraData = {className: this.className};
829
if (this.query && this.query.objectId) {
830
extraData.objectId = this.query.objectId;
0 commit comments