Skip to content

Commit 66b51b8

Browse files
committed
- fix Messaging events
1 parent cc82d72 commit 66b51b8

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
],
66
"plugins": [
77
"transform-object-assign",
8-
"transform-decorators-legacy",
9-
"transform-object-set-prototype-of-to-assign"
8+
"transform-decorators-legacy"
109
]
1110
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"babel-loader": "^7.1.2",
5858
"babel-plugin-transform-decorators-legacy": "^1.3.4",
5959
"babel-plugin-transform-object-assign": "^6.22.0",
60-
"babel-plugin-transform-object-set-prototype-of-to-assign": "^6.22.0",
6160
"babel-polyfill": "^6.20.0",
6261
"babel-preset-es2015": "^6.18.0",
6362
"babel-preset-stage-1": "^6.24.1",

src/counters/counter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const withCounterName = method => function(...args) {
3030
//TODO: will be removed when remove sync methods
3131
const namespaceLabel = 'Backendless.Counter.of(<CounterName>)'
3232

33-
Object.setPrototypeOf(Counter.prototype, {
33+
Object.assign(Counter.prototype, {
3434

3535
@deprecated(namespaceLabel, `${namespaceLabel}.incrementAndGet`)
3636
incrementAndGetSync: Utils.synchronized(withCounterName(incrementAndGet)),

src/data/permissions/persmission.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class DataPermission {
4343
//TODO: will be removed when remove sync methods
4444
const namespaceLabel = 'Backendless.Data.Permissions.{FIND|REMOVE|UPDATE}'
4545

46-
Object.setPrototypeOf(DataPermission.prototype, {
46+
Object.assign(DataPermission.prototype, {
4747

4848
@deprecated(namespaceLabel, `${namespaceLabel}.grantUser`)
4949
grantUserSync: Utils.synchronized(grantUser),

src/data/store/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DataStore {
3131

3232
}
3333

34-
Object.setPrototypeOf(DataStore.prototype, {
34+
Object.assign(DataStore.prototype, {
3535

3636
@deprecated(namespaceLabel, `${namespaceLabel}.save`)
3737
saveSync: Utils.synchronized(save),

src/messaging/polling-proxy.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export default class PollingProxy extends Proxy {
77
constructor(url) {
88
super()
99

10-
this.eventHandlers = {}
1110
this.restUrl = url
1211
this.timer = 0
1312
this.timeout = 0

src/messaging/proxy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
export default class Proxy {
22

3+
constructor() {
4+
this.eventHandlers = {}
5+
}
6+
37
on(eventName, handler) {
48
if (!eventName) {
59
throw new Error('Event name not specified')

0 commit comments

Comments
 (0)