Only add tags to array if not undefined

This commit is contained in:
Matt Pass
2012-12-27 11:37:58 +00:00
parent 6cf36cc99c
commit 4afbe4c2fc

View File

@@ -941,7 +941,9 @@ var ICEcoder = {
if ("undefined" != typeof state.curState) {
ICEcoder.htmlTagArray = [];
for (cx = state.curState.context; cx; cx = cx.prev) {
ICEcoder.htmlTagArray.unshift(cx.tagName);
if ("undefined" != typeof cx.tagName) {
ICEcoder.htmlTagArray.unshift(cx.tagName);
}
}
}
ICEcoder.tagString = ICEcoder.htmlTagArray[ICEcoder.htmlTagArray.length-1];