mirror of
https://git.hmsn.ink/kospo/helptalk/api.git
synced 2026-03-20 10:23:38 +09:00
first
This commit is contained in:
22
sample/prod/talk/bundle/mithril-2.2.2/promise/promise.js
Normal file
22
sample/prod/talk/bundle/mithril-2.2.2/promise/promise.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/* global window */
|
||||
"use strict"
|
||||
|
||||
var PromisePolyfill = require("./polyfill")
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
if (typeof window.Promise === "undefined") {
|
||||
window.Promise = PromisePolyfill
|
||||
} else if (!window.Promise.prototype.finally) {
|
||||
window.Promise.prototype.finally = PromisePolyfill.prototype.finally
|
||||
}
|
||||
module.exports = window.Promise
|
||||
} else if (typeof global !== "undefined") {
|
||||
if (typeof global.Promise === "undefined") {
|
||||
global.Promise = PromisePolyfill
|
||||
} else if (!global.Promise.prototype.finally) {
|
||||
global.Promise.prototype.finally = PromisePolyfill.prototype.finally
|
||||
}
|
||||
module.exports = global.Promise
|
||||
} else {
|
||||
module.exports = PromisePolyfill
|
||||
}
|
||||
Reference in New Issue
Block a user