1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-06-03 19:22:27 +00:00

Further style tweaks to #321

This commit is contained in:
Jermolene
2014-01-03 10:48:00 +00:00
parent 1374bd9d78
commit 8fc5c1d4a0
2 changed files with 4 additions and 4 deletions
@@ -61,9 +61,9 @@ var processRow = function(prevColumns) {
} else if(cellMatch[2]) {
// End of row
if(prevCell && colSpanCount > 1) {
try {
colSpanCount += prevCell.attributes.colspan.value;
} catch(e) {
if(prevCell.attributes && prevCell.attributes && prevCell.attributes.colspan) {
colSpanCount += prevCell.attributes.colspan.value;
} else {
colSpanCount -= 1;
}
$tw.utils.addAttributeToParseTreeNode(prevCell,"colspan",colSpanCount);
+1 -1
View File
@@ -20,7 +20,7 @@ exports.addAttributeToParseTreeNode = function(node,name,value) {
};
exports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {
if(node.type === "element" && node.attributes && node.attributes[name] && node.attributes[name].value != undefined) {
if(node.type === "element" && node.attributes && node.attributes[name] && node.attributes[name].value !== undefined) {
return node.attributes[name].value;
}
return defaultValue;