FIX: Don't call cooked decorators in composer if cooked is unchanged

If cooked is unchanged, ember will not re-render the preview area, so we should not re-run the post-processing decorators. This can cause issues when decorateCooked functions are not idempotent.
This commit is contained in:
David Taylor
2020-06-09 23:01:07 +01:00
parent f67e7d2fad
commit 9e98c02dd7

View File

@@ -367,6 +367,9 @@ export default Component.extend({
if (this.isDestroyed) {
return;
}
if (this.preview === cooked) return;
this.set("preview", cooked);
schedule("afterRender", () => {
if (this._state !== "inDOM") {