Skip to content

Commit e2cc688

Browse files
authored
Merge pull request #387 from Iterable/bugfix/MOB-4703-fix-action-context
2 parents 6afde5f + 7645a1c commit e2cc688

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ts/Iterable.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class IterableActionContext {
7070

7171
static fromDict(dict: any): IterableActionContext {
7272
const action = IterableAction.fromDict(dict["action"])
73-
const source = dict["actionSource"] as IterableActionSource
73+
const source = dict["source"] as IterableActionSource
7474
return new IterableActionContext(action, source)
7575
}
7676
}

ts/IterableAction.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class IterableAction {
2525

2626
static fromDict(dict: any): IterableActionContext {
2727
const action = IterableAction.fromDict(dict["action"])
28-
const source = dict["actionSource"] as IterableActionSource
28+
const source = dict["source"] as IterableActionSource
2929
return new IterableActionContext(action, source)
3030
}
3131
}

ts/__tests__/Iterable.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ test("custom action handler is called", () => {
263263

264264
Iterable.initialize("apiKey", config)
265265
const actionDict = { "type": actionName, "data": actionData }
266-
nativeEmitter.emit(EventName.handleCustomActionCalled, { "action": actionDict, "context": { "action": actionDict, "actionSource": IterableActionSource.inApp } });
266+
nativeEmitter.emit(EventName.handleCustomActionCalled, { "action": actionDict, "context": { "action": actionDict, "source": IterableActionSource.inApp } });
267267

268268
return TestHelper.delayed(0, () => {
269269
const expectedAction = new IterableAction(actionName, actionData)

0 commit comments

Comments
 (0)