8000 Fixing initialization of binding · cloudevents/sdk-javascript@d30e1fd · GitHub
[go: up one dir, main page]

Skip to content

Commit d30e1fd

Browse files
committed
Fixing initialization of binding
The following code: ```js const binding = Cloudevent.bindings["http-structured0.2"](config); ``` will return undefined. to create an instance we need to add the new keyword. Signed-off-by: Rinor Maloku <rinormaloku37@gmail.com>
1 parent a770b19 commit d30e1fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ var config = {
138138
*/
139139

140140
// The binding instance
141-
var binding = Cloudevent.bindings["http-structured0.1"](config);
141+
var binding = new Cloudevent.bindings["http-structured0.1"](config);
142142

143143
// Emit the event using Promise
144144
binding.emit(cloudevent)

0 commit comments

Comments
 (0)
0