Skip to content

Commit

Permalink
Prefer user settings during tools merge (#774)
Browse files Browse the repository at this point in the history
* Prefer user settings during tools merge
  • Loading branch information
gohabereg authored May 21, 2019
1 parent 22b9df7 commit 5a443b2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
16 changes: 8 additions & 8 deletions dist/editor.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog


### 2.14

- `Fix` *Config* — User config now has higher priority than internal settings

### 2.13

- `Improvements` *BlockSelection* — Block Selection allows to select single editable element via CMD+A
Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export default class Tools extends Module {
/**
* Assign internal tools
*/
_.deepMerge(this.config.tools, this.internalTools);
this.config.tools = _.deepMerge({}, this.internalTools, this.config.tools);

if (!this.config.hasOwnProperty('tools') || Object.keys(this.config.tools).length === 0) {
throw Error('Can\'t start without tools');
Expand Down

0 comments on commit 5a443b2

Please sign in to comment.