Skip to content

Commit

Permalink
Merge pull request #239 from FamousWolf/dev
Browse files Browse the repository at this point in the history
[MERGE] Changes for version 1.11.1
  • Loading branch information
FamousWolf authored Jan 4, 2025
2 parents ef3ed10 + 133649e commit 0128158
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
Add:
```yaml
resources:
- url: /local/week-planner-card.js?version=1.11.0
- url: /local/week-planner-card.js?version=1.11.1
type: module
```
- **Using the graphical editor**
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "week-planner-card",
"version": "1.11.0",
"version": "1.11.1",
"description": "Custom Home Assistant card to display events for a number of days from one or several calendars.",
"source": "src/index.js",
"module": "dist/week-planner-card.js",
Expand Down
5 changes: 3 additions & 2 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ export class WeekPlannerCardEditor extends LitElement {
${this.addTextField('calendars.' + index + '.filterText', 'Filter event text (regex)')}
${this.addBooleanField('calendars.' + index + '.hideInLegend', 'Hide in legend')}
${this.addButton('Remove calendar', 'mdi:trash-can', () => {
const config = Object.assign({}, this._config);
const config = JSON.parse(JSON.stringify(this._config));
if (config.calendars.length === 1) {
config.calendars = [];
} else {
delete config.calendars[index];
config.calendars = config.calendars.filter(Boolean);
}
this._config = config;
this.dispatchConfigChangedEvent();
Expand Down Expand Up @@ -323,7 +324,7 @@ export class WeekPlannerCardEditor extends LitElement {
}

setConfigValue(key, value) {
const config = Object.assign({}, this._config);
const config = JSON.parse(JSON.stringify(this._config));
const keyParts = key.split('.');
const lastKeyPart = keyParts.pop();
const lastObject = keyParts.reduce((objectPart, keyPart) => {
Expand Down

0 comments on commit 0128158

Please sign in to comment.