We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f432ac2 commit 690d078Copy full SHA for 690d078
dist/angular-websocket-mock.js
@@ -116,7 +116,7 @@
116
if (existingMocks[url]) {
117
existingMocks[url].map(function (socketMock) {
118
if (socketMock.onmessage && typeof socketMock.onmessage === "function") {
119
- socketMock.onmessage(data);
+ socketMock.onmessage({ data: JSON.stringify(data) });
120
}
121
});
122
src/angular-websocket-mock.js
@@ -96,7 +96,7 @@ function $WebSocketBackend() {
96
if(existingMocks[url]) {
97
existingMocks[url].map(function(socketMock) {
98
if(socketMock.onmessage && typeof socketMock.onmessage === "function") {
99
+ socketMock.onmessage({data: JSON.stringify(data)});
100
101
102
0 commit comments