codelabs-react
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -238,15 +238,27 @@ "use strict"; | ||
function getBold(element) { | ||
return { | ||
bold: !!element.textRun.textStyle.bold | ||
}; | ||
try { | ||
return { | ||
bold: !!element.textRun.textStyle.bold | ||
}; | ||
} catch (ex) { | ||
return false; | ||
} | ||
} | ||
function getItalic(element) { | ||
return { | ||
italic: !!element.textRun.textStyle.italic | ||
}; | ||
try { | ||
return { | ||
italic: !!element.textRun.textStyle.italic | ||
}; | ||
} catch (ex) { | ||
return false; | ||
} | ||
} | ||
function getParagraphText(node) { | ||
return node.paragraph.elements[0].textRun.content; | ||
try { | ||
return node.paragraph.elements[0].textRun.content; | ||
} catch (ex) { | ||
return ""; | ||
} | ||
} | ||
@@ -253,0 +265,0 @@ |
{ | ||
"name": "codelabs-react", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -260,15 +260,27 @@ const infoColor = { red: 0.8509804, green: 0.91764706, blue: 0.827451 }; | ||
function getBold(element) { | ||
return { | ||
bold: !!element.textRun.textStyle.bold, | ||
}; | ||
try { | ||
return { | ||
bold: !!element.textRun.textStyle.bold, | ||
}; | ||
} catch (ex) { | ||
return false; | ||
} | ||
} | ||
function getItalic(element) { | ||
return { | ||
italic: !!element.textRun.textStyle.italic, | ||
}; | ||
try { | ||
return { | ||
italic: !!element.textRun.textStyle.italic, | ||
}; | ||
} catch (ex) { | ||
return false; | ||
} | ||
} | ||
function getParagraphText(node) { | ||
return node.paragraph.elements[0].textRun.content; | ||
try { | ||
return node.paragraph.elements[0].textRun.content; | ||
} catch (ex) { | ||
return ""; | ||
} | ||
} | ||
@@ -275,0 +287,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
304399
1358
0