Skip to content

Commit 023361e

Browse files
committed
wip
1 parent 73987e7 commit 023361e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

meteor/server/api/deviceTriggers/observer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ export async function receiveInputDeviceTrigger(
116116
if (!actionManager)
117117
throw new Meteor.Error(500, `No Studio Action Manager available to handle trigger in Studio "${studioId}"`)
118118

119-
const mountedActions = DeviceTriggerMountedActions.findAll({
119+
const mountedActions = DeviceTriggerMountedActions.find({
120120
deviceId,
121121
deviceTriggerId: triggerId,
122-
})
122+
}).fetch()
123123

124124
for (const mountedAction of mountedActions) {
125125
if (values && !_.isMatch(values, mountedAction.values)) return

meteor/server/api/rest/koa.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Meteor.startup(() => {
5454

5555
res.on('finish', () => {
5656
let route = req.originalUrl
57-
if (req.originalUrl.endsWith(req.url.slice(1)) && req.url.length > 1) {
57+
if (req.originalUrl && req.url && req.originalUrl.endsWith(req.url.slice(1)) && req.url.length > 1) {
5858
route = req.originalUrl.slice(0, -1 * (req.url.length - 1))
5959
}
6060

61-
if (route.endsWith('/')) {
61+
if (route && route.endsWith('/')) {
6262
route = route.slice(0, -1)
6363
}
6464

0 commit comments

Comments
 (0)