Skip to content

Commit

Permalink
fix null error when initializing with undefined options
Browse files Browse the repository at this point in the history
  • Loading branch information
undergroundwires committed Feb 27, 2021
1 parent a74cae2 commit 939db15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ez-consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const ez_consent = (() => {
return !consentCookies.getCookie();
}
function fillDefaults(options) {
return objectAssignRecursively(defaults, options);
return objectAssignRecursively(defaults, options || {});
function objectAssignRecursively(target, ...sources) {
// Immplemented because Object.assign does not assign nested objects
// options = {...defaults, ...options} works but it's not supported in older JS:
Expand Down

0 comments on commit 939db15

Please sign in to comment.