Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

Accept single trigger in JSRule #12

Merged
merged 1 commit into from
Sep 14, 2020
Merged

Conversation

simonihmig
Copy link
Contributor

The code block example suggests passing a single trigger instance is possible (see https://github.com/jpg0/ohj/blob/master/rules.js#L91), but it had to be an array actually. This change now accepts both. I believe that's reasonable, as many rules will have just a single trigger (e.g. cron), so having to wrap in an array explicitly might be annoying.

The code block example suggests passing a single trigger instance is possible, but it had to be an array actually. This change now accepts both. I believe that's reasonable, as many rules will have just a single trigger (e.g. cron), so having to wrap in an array explicitly might be annoying.
@simonihmig simonihmig mentioned this pull request Sep 13, 2020
@simonihmig
Copy link
Contributor Author

Hm, seems my IDE doesn't like the trailing spaces. Which makes the diff a bit confusing. Hope you don't mind?

@jpg0
Copy link
Owner

jpg0 commented Sep 14, 2020

No worries about the spaces and thanks!

@jpg0 jpg0 merged commit 1e11c84 into jpg0:master Sep 14, 2020
@simonihmig
Copy link
Contributor Author

@jpg0 seems this change was lost by your commit here: 791e3c8 😬

@jpg0
Copy link
Owner

jpg0 commented Jan 4, 2021

Ah sorry. Things are a bit of a mess atm because I planned to upgrade everything to OH3, then had to abandon upgrading due to openhab/openhab-core#2002

I'll fix this now

@jpg0
Copy link
Owner

jpg0 commented Jan 4, 2021

58e0f15

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants