From 677722d676bb27164fd7c77cdcf2bda937590fc6 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 25 Jul 2019 07:50:31 +0200 Subject: [PATCH] FIX: prevents egression mutating read only object --- .../discourse/components/explorer-schema-onetable.js.es6 | 2 +- .../templates/components/explorer-schema-onetable.hbs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/components/explorer-schema-onetable.js.es6 b/assets/javascripts/discourse/components/explorer-schema-onetable.js.es6 index af1036d..a3ad160 100644 --- a/assets/javascripts/discourse/components/explorer-schema-onetable.js.es6 +++ b/assets/javascripts/discourse/components/explorer-schema-onetable.js.es6 @@ -11,7 +11,7 @@ export default Ember.Component.extend({ $(this.element) .find(".schema-table-name") .click(e => { - this.set("open", !this.open); + this.set("table.open", !this.table.open); e.preventDefault(); }); }, diff --git a/assets/javascripts/discourse/templates/components/explorer-schema-onetable.hbs b/assets/javascripts/discourse/templates/components/explorer-schema-onetable.hbs index bb2527c..1d94a69 100644 --- a/assets/javascripts/discourse/templates/components/explorer-schema-onetable.hbs +++ b/assets/javascripts/discourse/templates/components/explorer-schema-onetable.hbs @@ -1,5 +1,5 @@
- {{#if table.open}} + {{#if open}} {{d-icon "caret-down"}} {{else}} {{d-icon "caret-right"}} @@ -7,7 +7,7 @@ {{table.name}}
- {{#if table.open}} + {{#if open}}
{{#each table.columns as |col|}}