0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Koenig - Fixed HTML card init error

no issue
- `payload.set` is not always a method because mobiledoc-kit can give us POJOs
This commit is contained in:
Kevin Ansfield 2018-05-07 15:39:45 +01:00
parent 70ee42a51a
commit 5adbb9b665

View file

@ -39,8 +39,9 @@ export default Component.extend({
this._super(...arguments);
let payload = this.payload || {};
// CodeMirror errors on a `null` or `undefined` value
if (!payload.html) {
payload.set('html', '');
set(payload, 'html', '');
}
this.set('payload', payload);