Unverified Commit 77fb7617 authored by Kartheek Palla's avatar Kartheek Palla Committed by GitHub
Browse files

Merge pull request #265 from snehar-nd/snehar-nd/printdocx

"Handled no data in MTF table"
Showing with 15 additions and 1 deletion
+15 -1
......@@ -375,6 +375,17 @@ function MTFTabel(question) {
}
function createFTB(data, count) {
if(data === undefined){
return new Paragraph({
alignment: AlignmentType.LEFT,
children: [
new TextRun({
text: ``,
thematicBreak: true,
}),
],
});
}
if (count !== 0) {
return new Paragraph({
alignment: AlignmentType.LEFT,
......@@ -400,6 +411,9 @@ function createFTB(data, count) {
function createSAObject(data, count) {
const arr = [];
if(data === undefined){
return createFTB(data, count);
}
if (data.text) {
data.text
.map((text) => {
......@@ -712,7 +726,6 @@ function displayNumber(data) {
function displayOptionsObject(data, count) {
const arr = [];
if (data.text) {
if (typeof data === "object") {
arr.push(new TextRun(data));
......@@ -907,6 +920,7 @@ function formatview(data, count, questionCounter, marks) {
}
function mtfTableData(data) {
const cell = new TableCell({
children: [MTFTabel(data)],
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment