Skip to content

Commit 8ebc27b

Browse files
temp
1 parent c18f44a commit 8ebc27b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

components/socket-events/modules/socket-events/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function getOrCreateNewSocket() {
9191

9292
Socket.prototype.write = function (data) {
9393
if (this.dataBuffer) {
94-
if (typeof data === 'undefined') {
94+
if (typeof data === 'undefined' || data === null) {
9595
return;
9696
} else if (Array.isArray(data)) {
9797
throw Error('arrays not allowed anymore');

main/include/esp32-javascript-config.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ SOFTWARE.
2929
#define EL_TIMER_EVENT_TYPE 0
3030
#define EL_WIFI_EVENT_TYPE 1
3131
#define EL_SOCKET_EVENT_TYPE 2
32+
#define RADIO_RECEIVE_EVENT_TYPE 3
3233
// define your custom event types here
3334
// #define CUSTOM_XXX_EVENT_TYPE 3
3435

@@ -41,6 +42,7 @@ extern void registerWifiEventsBindings(duk_context *ctx);
4142
extern void loadWifiEvents(duk_context *ctx);
4243
// put your init function declaration here
4344
// extern void init_esp32_XXX(duk_context *ctx);
45+
extern void init_esp32_home(duk_context *ctx);
4446
#endif
4547

4648
#if ESP32_JAVASCRIPT_EXTERN == ESP32_JAVASCRIPT_EXTERN_REGISTER
@@ -50,4 +52,5 @@ initSocketFunctions(ctx);
5052
registerWifiEventsBindings(ctx);
5153
// call your init function here
5254
// init_esp32_XXX(ctx);
55+
init_esp32_home(ctx);
5356
#endif

0 commit comments

Comments
 (0)