File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -48,24 +48,24 @@ export class NotificationService<T> {
48
48
49
49
public subscribeMap(
50
50
observer : Observable <any >,
51
- mapDataFrom ? : (data : any ) => T ,
52
- mapErrorFrom ? : (error : any ) => any
51
+ mapData ? : (data : any ) => T ,
52
+ mapError ? : (error : any ) => any
53
53
) {
54
54
this .resetError ();
55
55
observer .subscribe ({
56
56
next : (data ) => {
57
57
console .log (' Data loaded successfully' , data );
58
- if (mapDataFrom ) {
59
- var d = mapDataFrom (data );
58
+ if (mapData ) {
59
+ var d = mapData (data );
60
60
this .data$ .next (d );
61
61
return ;
62
62
}
63
63
this .data$ .next (data );
64
64
},
65
65
error : (e ) => {
66
66
console .error (' Error loading data' , e .message );
67
- if (mapErrorFrom ) {
68
- e = mapErrorFrom (e );
67
+ if (mapError ) {
68
+ e = mapError (e );
69
69
}
70
70
this .error$ .next (e );
71
71
}
You can’t perform that action at this time.
0 commit comments