Skip to content

Commit 211372c

Browse files
committed
- fix Counters API
1 parent fd1ba04 commit 211372c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/counters/counter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
reset
1414
} from './methods'
1515

16-
1716
export default class Counter {
1817
constructor(name) {
1918
if (!name || !Utils.isString(name)) {
@@ -24,12 +23,13 @@ export default class Counter {
2423
}
2524
}
2625

27-
const withCounterName = method => (...args) => method(this.name, ...args)
26+
const withCounterName = method => function(...args) {
27+
return method(this.name, ...args)
28+
}
2829

2930
//TODO: will be removed when remove sync methods
3031
const namespaceLabel = 'Backendless.Counter.of(<CounterName>)'
3132

32-
3333
Object.setPrototypeOf(Counter.prototype, {
3434

3535
@deprecated(namespaceLabel, `${namespaceLabel}.incrementAndGet`)

0 commit comments

Comments
 (0)