Skip to content

Commit

Permalink
Merge 81e0265 into 3ffcd83
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjbarton authored Oct 14, 2019
2 parents 3ffcd83 + 81e0265 commit 9098175
Show file tree
Hide file tree
Showing 5 changed files with 1,527 additions and 1,526 deletions.
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

0 comments on commit 9098175

Please sign in to comment.