Skip to content

Commit

Permalink
cardHooks take priority over user card options
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Feb 9, 2017
1 parent b451a22 commit d35a903
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/components/mobiledoc-editor/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ export default Component.extend({
this.get('componentAtoms').removeObject(atom);
}
};
editorOptions.cardOptions = assign(componentHooks, editorOptions.cardOptions);
if (editorOptions.cardOptions) {
editorOptions.cardOptions = assign(editorOptions.cardOptions, componentHooks);
} else {
editorOptions.cardOptions = componentHooks;
}
editor = new Editor(editorOptions);
editor.willRender(() => {
// The editor's render/rerender will happen after this `editor.willRender`,
Expand Down

0 comments on commit d35a903

Please sign in to comment.