Skip to content
Snippets Groups Projects
Commit 59f881c4 authored by Yana Rose's avatar Yana Rose
Browse files

handle empty HEADER record

parent dcdb95a0
Branches
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ export function addHeader(data: string, s: number, e: number, header: PdbHeaderD ...@@ -25,7 +25,7 @@ export function addHeader(data: string, s: number, e: number, header: PdbHeaderD
// idCode _entry.id // idCode _entry.id
const line = data.substring(s, e); const line = data.substring(s, e);
header.id_code = line.substring(62, 66); header.id_code = line.substring(62, 66).trim() || undefined;
header.dep_date = line.substring(50, 59); header.dep_date = line.substring(50, 59).trim() || undefined;
header.classification = line.substring(10, 50).trim(); header.classification = line.substring(10, 50).trim() || undefined;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment