mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
check that removeAttribute is a function (fixes #19)
This commit is contained in:
+3
-1
@@ -140,7 +140,9 @@ module.exports = function(redis) {
|
||||
let elements_with_event_attr = data.html.querySelectorAll(event_attributes.join(','))
|
||||
for(let i = 0; i < elements_with_event_attr.length; i++) {
|
||||
for(let j = 0; j < event_attributes.length; j++) {
|
||||
elements_with_event_attr.removeAttribute(event_attributes[j])
|
||||
if(typeof(elements_with_event_attr.removeAttribute) === 'function') {
|
||||
elements_with_event_attr.removeAttribute(event_attributes[j])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user