Skip to content

Commit

Permalink
move setValue registerNewParameter outside the async queue
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipivan committed Dec 3, 2024
1 parent 990a4d6 commit 6911064
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ export async function resolvePath(context: CompanionCommonCallbackContext, path:
const setValue =
(self: EmberPlusInstance, emberClient: EmberClient, type: EmberModel.ParameterType, queue: PQueue) =>
async (action: CompanionActionEvent, context: CompanionActionContext): Promise<void> => {
const path = await resolvePath(context, action.options['path']?.toString() ?? '')
if (action.options.variable) {
await self.registerNewParameter(path)
}
queue
.add(async () => {
const path = await resolvePath(context, action.options['path']?.toString() ?? '')
if (action.options.variable) {
await self.registerNewParameter(path)
}
const node = await emberClient.getElementByPath(path)
// TODO - do we handle not found?
if (node && node.contents.type === EmberModel.ElementType.Parameter) {
Expand Down

0 comments on commit 6911064

Please sign in to comment.