Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

subscribeToPromise.js 413B

123456789101112
  1. import { hostReportError } from './hostReportError';
  2. export const subscribeToPromise = (promise) => (subscriber) => {
  3. promise.then((value) => {
  4. if (!subscriber.closed) {
  5. subscriber.next(value);
  6. subscriber.complete();
  7. }
  8. }, (err) => subscriber.error(err))
  9. .then(null, hostReportError);
  10. return subscriber;
  11. };
  12. //# sourceMappingURL=subscribeToPromise.js.map