Commit 90738870 authored by Randall Leeds's avatar Randall Leeds

Polyfill Promise properly

parent 1a069f6a
raf = require('raf')
Promise = global.Promise ? require('es6-promise').Promise
Annotator = require('annotator')
$ = Annotator.$
......
......@@ -8,6 +8,8 @@ require('jquery-scrollintoview')
var g = Annotator.Util.getGlobal();
if (g.wgxpath) g.wgxpath.install();
require('es6-promise')
var nodeIteratorShim = require('node-iterator-shim')
nodeIteratorShim();
......
extend = require('extend')
Promise = global.Promise ? require('es6-promise').Promise
Annotator = require('annotator')
......
raf = require('raf')
Promise = global.Promise ? require('es6-promise').Promise
Annotator = require('annotator')
Guest = require('../guest')
anchoring = require('../anchoring/html')
......
......@@ -36,6 +36,7 @@ module.exports = function(config) {
'vendor/moment-timezone.js',
'vendor/moment-timezone-data.js',
'vendor/polyfills/url.js',
'../../../node_modules/es6-promise/dist/es6-promise.js',
// Test deps
'vendor/angular-mocks.js',
......
Promise = global.Promise ? require('es6-promise').Promise
{module, inject} = require('angular-mock')
assert = chai.assert
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment