Commit 7c6993e7 authored by David Schnur's avatar David Schnur

Fix a regression when no options are provided.

parent f1248155
......@@ -642,9 +642,12 @@ Licensed under the MIT license.
$.extend(true, options, opts);
//Override options.colors after $.extend if user has set colors, because extend does not clear out excess
//default colors if user defines color palette smaller than default palette size (currently 5).
if (opts.colors) {
// $.extend merges arrays, rather than replacing them. When less
// colors are provided than the size of the default palette, we
// end up with those colors plus the remaining defaults, which is
// not expected behavior; avoid it by replacing them here.
if (opts && opts.colors) {
options.colors = opts.colors;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment