I have a data stream which is processed by rxjs. When I used the do operator (the side-effect operator), I got the following error message:
[ERROR] in home-attendance.test.js
237:16:missing name after . operator
[ERROR] in home-attendance.test.js
241:27:missing ; before statement
[ERROR] in home-attendance.test.js
1:0:Compilation produced 2 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 2 syntax errors.
at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:172)
at org.mozilla.javascript.Parser.parse(Parser.java:396)
at org.mozilla.javascript.Parser.parse(Parser.java:340)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:315)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:536)
at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:147)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)
the code is something like:
Rx.Observable.create(emitter)
.someTransformationOperators
.do(sideEffectFunction) // this is where the error occurs
.someOtherTransformationOperators
.subscribe();
I have a data stream which is processed by
rxjs
. When I used thedo
operator (the side-effect operator), I got the following error message:the code is something like:
And I have to use
map
instead ofdo
, like this:But it is ugly. Hope it will be fixed.