Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.

Commit afd0167

Browse files
fix(ListObservable): return key for push method
related to issue #16
1 parent a94b6b9 commit afd0167

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/afo-list-observable.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ export class AfoListObservable<T> extends ReplaySubject<T> {
7373
*/
7474
push(value: any) {
7575
let resolve;
76-
let promise = new Promise(r => resolve = r);
76+
let promise: any = new Promise(r => resolve = r);
7777
const key = this.ref.$ref.push(value, () => {
7878
resolve();
7979
}).key;
80+
promise.key = key;
8081
this.emulate('push', value, key);
8182
OfflineWrite(
8283
promise,

0 commit comments

Comments
 (0)