Skip to content

Commit

Permalink
check if any of data, key, or service_data is in action when merging …
Browse files Browse the repository at this point in the history
…instead of checking action, as action may be defined by a template
  • Loading branch information
Nerwyn committed Jan 29, 2024
1 parent b090c7b commit 0b03a88
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/android-tv-card.min.js

Large diffs are not rendered by default.

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": "android-tv-card",
"version": "3.2.9",
"version": "3.2.10",
"description": "Android TV Remote Card",
"main": "./dist/android-tv-card.js",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion src/android-tv-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,11 @@ class AndroidTVCard extends LitElement {
}

// Merge service_data, target, and data fields
if (['call-service', 'more-info'].includes(action.action)) {
if (
['data', 'target', 'service_data'].some(
(key) => key in action,
)
) {
action.data = {
...action.data,
...(
Expand Down

0 comments on commit 0b03a88

Please sign in to comment.