mirror of
https://github.com/datashard/snapshot.git
synced 2024-11-22 06:02:29 +00:00
fix: string snapshots
This commit is contained in:
parent
6af1b2cdcb
commit
515b5ba900
1 changed files with 1 additions and 5 deletions
|
@ -2,11 +2,7 @@ const sd = require('@wildpeaks/snapshot-dom')
|
||||||
const beautify = require('js-beautify').html
|
const beautify = require('js-beautify').html
|
||||||
|
|
||||||
function isJqueryElement (x) {
|
function isJqueryElement (x) {
|
||||||
// had to work around "switchcase" bug
|
return x && typeof x !== 'string' && 'wrap' in x
|
||||||
function isObject (x) {
|
|
||||||
return x instanceof Object
|
|
||||||
}
|
|
||||||
return x && isObject(x) && 'wrap' in x
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// converts DOM element to a JSON object
|
// converts DOM element to a JSON object
|
||||||
|
|
Loading…
Reference in a new issue