Merge pull request #222 from keepassxreboot/add_value_check

Add check for newValue
This commit is contained in:
Janek Bevendorff 2018-07-16 20:40:41 +02:00 committed by GitHub
commit f359e4af55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1335,7 +1335,7 @@ let observer = new MutationObserver(function(mutations, observer) {
// Handle attributes only if CSS display is modified
if (mut.type === 'attributes') {
const newValue = mut.target.getAttribute(mut.attributeName);
if (newValue.includes('display') || newValue.includes('z-index')) {
if (newValue && (newValue.includes('display') || newValue.includes('z-index'))) {
if (mut.target.style.display !== 'none') {
cipObserverHelper.handleObserverAdd(mut.target);
} else {