Skip to content

Commit fef9dc4

Browse files
committed
use payload.custom instead of payload.data.custom
1 parent 310ef4b commit fef9dc4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/include_custom_object.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@
1818
// as an example, let's include the current value of window.myvariable
1919
// as custom data in the payload.
2020

21-
// ensure payload.data.custom is set
22-
payload.data = payload.data || {};
23-
payload.data.custom = payload.data.custom || {};
21+
// ensure payload.custom is set
22+
payload.custom = payload.custom || {};
2423

2524
// add our data
26-
payload.data.custom.myvariable = window.myvariable;
25+
payload.custom.myvariable = window.myvariable;
2726

2827
// no need to return anything (return value is unused)
2928
};

0 commit comments

Comments
 (0)