mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
12 lines
412 B
JavaScript
12 lines
412 B
JavaScript
|
import { hostReportError } from './hostReportError';
|
||
|
export const subscribeToPromise = (promise) => (subscriber) => {
|
||
|
promise.then((value) => {
|
||
|
if (!subscriber.closed) {
|
||
|
subscriber.next(value);
|
||
|
subscriber.complete();
|
||
|
}
|
||
|
}, (err) => subscriber.error(err))
|
||
|
.then(null, hostReportError);
|
||
|
return subscriber;
|
||
|
};
|
||
|
//# sourceMappingURL=subscribeToPromise.js.map
|