okam-core
Version:
The extension for small program framework
20 lines (15 loc) • 358 B
JavaScript
/**
* @file Polyfill for Promise support
* @author sparklewhy@gmail.com
*/
;
import PolyfillPromise from 'promise-polyfill';
import {appGlobal} from '../na/index';
let currPromise;
if (typeof Promise !== 'function') {
currPromise = appGlobal.Promise = PolyfillPromise;
}
else {
currPromise = Promise;
}
export default currPromise;