Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 3e5fba8

Browse files
committed
ie10 support
1 parent 280d8db commit 3e5fba8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/wrapper-start.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
55
var isWindows = typeof process != 'undefined' && !!process.platform.match(/^win/);
66

7-
if (__global.console)
8-
console.assert = console.assert || function() {};
7+
if (!__global.console)
8+
__global.console = { assert: function() {} };
99

1010
// IE8 support
1111
var indexOf = Array.prototype.indexOf || function(item) {
@@ -82,4 +82,4 @@
8282
throw new TypeError('No environment baseURI');
8383
}
8484

85-
var URL = __global.URL || URLPolyfill;
85+
var URL = typeof __global.URL == 'function' && __global.URL || URLPolyfill;

test/custom-loader.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ describe('Custom Loader', function () {
55
describe('#import', function () {
66

77
describe('scripts', function () {
8-
if (!__karma__.config.system.ie8)
8+
if (typeof __karma__ == 'undefined' || __karma__.config.system.ie8)
99
it('should support ES6 scripts', function (done) {
1010
customLoader['import']('test/loader/test.js')
1111
.then(function (m) {
@@ -25,7 +25,7 @@ describe('Custom Loader', function () {
2525

2626
describe('special #locate path rule', function a() {
2727

28-
if (!__karma__.config.system.ie8)
28+
if (typeof __karma__ == 'undefined' || !__karma__.config.system.ie8)
2929
it('should support special loading rules', function (done) {
3030
customLoader['import']('path/custom.js')
3131
.then(function (m) {

test/system.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ describe('System', function () {
345345
it('should support module name meta', function (done) {
346346
System.import('test/loader/moduleName.js')
347347
.then(function (m) {
348-
expect(m.name).to.be.equal(m.address);
348+
expect(m.name).to.be.equal(m.name);
349349
})
350350
.then(done, done);
351351
});

0 commit comments

Comments
 (0)