Skip to content
Snippets Groups Projects
Verified Commit d94697cf authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: reset config #136

parent f05d71b8
No related branches found
No related tags found
No related merge requests found
......@@ -503,9 +503,11 @@ class CustomElement extends HTMLElement {
if (isString(options)) {
options = parseOptionsJSON.call(this, options);
}
// 2024-01-21: remove this.defaults, otherwise it will overwrite
// the current settings that have already been made.
// https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/136
extend(
this[internalSymbol].getSubject()["options"],
this.defaults,
options,
);
......@@ -979,9 +981,12 @@ function getOptionsFromAttributes() {
}
/**
* Parses the given JSON data and returns the parsed object.
*
* @private
* @param data
* @return {Object}
* @param {string} data The JSON data to be parsed.
* @returns {Object} The parsed object.
* @throws {error} Throws an error if the JSON data is not valid.
*/
function parseOptionsJSON(data) {
let obj = {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment