Skip to content

Commit

Permalink
add workaround for non-standard phantomjs NamedNodeMap behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
autarc committed Nov 7, 2016
1 parent cd87654 commit 0ef0ac8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ export function getCommonProperties (elements) {
const attributes = Object.keys(elementAttributes).reduce((attributes, key) => {
const attribute = elementAttributes[key]
const attributeName = attribute.name
if (attributeName !== 'class') {
// NOTE: workaround detection for non-standard phantomjs NamedNodeMap behaviour
// (issue: https://github.com/ariya/phantomjs/issues/14634)
if (attribute && attributeName !== 'class') {
attributes[attributeName] = attribute.value
}
return attributes
Expand Down

0 comments on commit 0ef0ac8

Please sign in to comment.