@@ -101,12 +101,12 @@ function getOccurrence (object, barcode) {
101101 if ( o . subfield . length > 1 ) {
102102 // return the subield entry with the matching barcode
103103 return _ . forEach ( o . subfield , function ( data ) {
104- if ( data . $t === barcode ) {
104+ if ( data [ '#text' ] === barcode ) {
105105 return o
106106 }
107107 } )
108108 } else { // if there is just one subfield entry
109- if ( o . subfield . $t === barcode ) {
109+ if ( o . subfield [ '#text' ] === barcode ) {
110110 return o
111111 }
112112 }
@@ -125,7 +125,7 @@ function getOccurrence (object, barcode) {
125125function getPPN ( object ) {
126126 const data = _ . find ( object [ 'zs:searchRetrieveResponse' ] [ 'zs:records' ] [ 'zs:record' ] [ 'zs:recordData' ] . record . datafield , { tag : '003@' } )
127127 if ( data !== undefined ) {
128- return data . subfield . $t
128+ return data . subfield [ '#text' ]
129129 } else {
130130 return ''
131131 }
@@ -134,7 +134,7 @@ function getPPN (object) {
134134function getEPN ( object ) {
135135 const data = _ . find ( object [ 'zs:searchRetrieveResponse' ] [ 'zs:records' ] [ 'zs:record' ] [ 'zs:recordData' ] . record . datafield , { tag : '203@' } )
136136 if ( data !== undefined ) {
137- return data . subfield . $t
137+ return data . subfield [ '#text' ]
138138 } else {
139139 return ''
140140 }
@@ -144,7 +144,7 @@ function getDate (object, occ) {
144144 const parent = _ . find ( object [ 'zs:searchRetrieveResponse' ] [ 'zs:records' ] [ 'zs:record' ] [ 'zs:recordData' ] . record . datafield , { tag : '201B' , occurrence : occ } )
145145 const data = _ . find ( parent . subfield , { code : '0' } )
146146 if ( data !== undefined ) {
147- return data . $t
147+ return data [ '#text' ]
148148 } else {
149149 return ''
150150 }
@@ -154,7 +154,7 @@ function getTxt (object, occ) {
154154 const parent = _ . find ( object [ 'zs:searchRetrieveResponse' ] [ 'zs:records' ] [ 'zs:record' ] [ 'zs:recordData' ] . record . datafield , { tag : '209A' , occurrence : occ } )
155155 const data = _ . find ( parent . subfield , { code : 'a' } )
156156 if ( data !== undefined ) {
157- return data . $t
157+ return data [ '#text' ]
158158 } else {
159159 return ''
160160 }
@@ -173,7 +173,7 @@ function getLocation (object, occ) {
173173 const parent = _ . find ( object [ 'zs:searchRetrieveResponse' ] [ 'zs:records' ] [ 'zs:record' ] [ 'zs:recordData' ] . record . datafield , { tag : '209A' , occurrence : occ } )
174174 const data = _ . find ( parent . subfield , { code : 'f' } )
175175 if ( data !== undefined ) {
176- return data . $t
176+ return data [ '#text' ]
177177 } else {
178178 return ''
179179 }
@@ -183,7 +183,7 @@ function getLoanIndication (object, occ) {
183183 const parent = _ . find ( object [ 'zs:searchRetrieveResponse' ] [ 'zs:records' ] [ 'zs:record' ] [ 'zs:recordData' ] . record . datafield , { tag : '209A' , occurrence : occ } )
184184 const data = _ . find ( parent . subfield , { code : 'd' } )
185185 if ( data !== undefined ) {
186- return data . $t
186+ return data [ '#text' ]
187187 } else {
188188 return ''
189189 }
0 commit comments