Open orslumen opened 13 years ago
The method insertBefore in dom.js starts with the following debug statement:
insertBefore
log.debug('insert %s Before %s', newChild.nodeName, refChild.nodeName);
But results in a TypeError: Cannot read property 'nodeName' of null when the refChild (or newChild is undefined). This can be fixed as follows:
log.debug('insert %s Before %s', newChild && newChild.nodeName, refChild && refChild.nodeName);
See commit https://github.com/orslumen/env-js/commit/c22faaf7c3ec3b290b8e18a8b3afd537bffb5982
But would it not be better (performance wise) to comment out all log statements, or to add something like if (Log.level <= debug) { log.debug(...) } to all debug statements?
if (Log.level <= debug) { log.debug(...) }
The method
insertBefore
in dom.js starts with the following debug statement:But results in a TypeError: Cannot read property 'nodeName' of null when the refChild (or newChild is undefined). This can be fixed as follows:
See commit https://github.com/orslumen/env-js/commit/c22faaf7c3ec3b290b8e18a8b3afd537bffb5982
But would it not be better (performance wise) to comment out all log statements, or to add something like
if (Log.level <= debug) { log.debug(...) }
to all debug statements?