Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deps): Remove core-js dependency. #3379

Merged
merged 1 commit into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion client/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* global io */
/* eslint-disable no-new */

require('core-js/stable')
var Karma = require('./karma')
var StatusUpdater = require('./updater')
var util = require('../common/util')
Expand Down
14 changes: 12 additions & 2 deletions common/stringify.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
var serialize = require('dom-serialize')
var serialize = null
try {
serialize = require('dom-serialize')
} catch (e) {
// Ignore failure on IE8
}

var instanceOf = require('./util').instanceOf

function isNode (obj) {
Expand Down Expand Up @@ -56,7 +62,11 @@ function stringify (obj, depth) {
} else if (obj.outerHTML) {
return obj.outerHTML
} else if (isNode(obj)) {
return serialize(obj)
if (serialize) {
return serialize(obj)
} else {
return 'Skipping stringify, no support for dom-serialize'
}
} else if (instanceOf(obj, 'Error')) {
return obj.toString() + '\n' + obj.stack
} else {
Expand Down
Loading