Skip to content

Commit 17985aa

Browse files
committed
Adds fix for the issue
1 parent b196349 commit 17985aa

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/RestQuery.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,17 @@ RestQuery.prototype.runAfterFindTrigger = function() {
590590
}
591591
// Run afterFind trigger and set the new results
592592
return triggers.maybeRunAfterFindTrigger(triggers.Types.afterFind, this.auth, this.className,this.response.results, this.config).then((results) => {
593-
this.response.results = results;
593+
// Ensure we properly set the className back
594+
if (this.redirectClassName) {
595+
/* eslint-disable */
596+
console.log(results);
597+
this.response.results = results.map((object) => {
598+
object.className = this.redirectClassName;
599+
return object;
600+
});
601+
} else {
602+
this.response.results = results;
603+
}
594604
});
595605
};
596606

0 commit comments

Comments
 (0)