replace q method calls with bluebird ones
``` find src test -name '*.js' | xargs perl -i -pe 's/q\.(all|defer|reject|delay|try|isFulfilled)\(/Promise.$1(/' ```
This commit is contained in:
parent
b29b4a959b
commit
d5b550f89a
8 changed files with 35 additions and 35 deletions
|
@ -188,7 +188,7 @@ var makeRegistrationUrl = function(params) {
|
|||
window.addEventListener('hashchange', onHashChange);
|
||||
|
||||
function getConfig() {
|
||||
let deferred = q.defer();
|
||||
let deferred = Promise.defer();
|
||||
|
||||
request(
|
||||
{ method: "GET", url: "config.json" },
|
||||
|
|
|
@ -68,7 +68,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
// annoyingly, the latest spec says this returns a
|
||||
// promise, but this is only supported in Chrome 46
|
||||
// and Firefox 47, so adapt the callback API.
|
||||
const defer = q.defer();
|
||||
const defer = Promise.defer();
|
||||
global.Notification.requestPermission((result) => {
|
||||
defer.resolve(result);
|
||||
});
|
||||
|
@ -103,7 +103,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
}
|
||||
|
||||
_getVersion(): Promise<string> {
|
||||
const deferred = q.defer();
|
||||
const deferred = Promise.defer();
|
||||
|
||||
// We add a cachebuster to the request to make sure that we know about
|
||||
// the most recent version on the origin server. That might not
|
||||
|
|
|
@ -100,7 +100,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
|
|||
}
|
||||
|
||||
function _submitReport(endpoint, body, progressCallback) {
|
||||
const deferred = q.defer();
|
||||
const deferred = Promise.defer();
|
||||
|
||||
const req = new XMLHttpRequest();
|
||||
req.open("POST", endpoint);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue