Skip to content

Commit

Permalink
Fix overridden default options on first instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwep committed May 23, 2020
1 parent d36a98a commit 8f8e7a5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/pickr.es5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.es5.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/pickr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/js/pickr.js
Expand Up @@ -100,7 +100,7 @@ class Pickr {
constructor(opt) {

// Assign default values
this.options = opt = Object.assign(Pickr.DEFAULT_OPTIONS, opt);
this.options = opt = Object.assign({...Pickr.DEFAULT_OPTIONS}, opt);

const {swatches, components, theme, sliders, lockOpacity, padding} = opt;

Expand Down

0 comments on commit 8f8e7a5

Please sign in to comment.