Project

General

Profile

« Previous | Next » 

Revision 61370

[Branch angular-11 | Library]: searchResearchResults.service.ts: [Bug fix] When parsing pids, concat an empty string (+"") to stringify them when they are considered numbers (bug when calling .replace).

View differences:

modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/services/searchResearchResults.service.ts
204 204
        if (!Array.isArray(resData['pid'])) {
205 205
          if (resData['pid'].classid && resData['pid'].classid == 'doi') {
206 206
            if (resData['pid'].content != '' && resData['pid'].content != null) {
207
              result.DOIs.push(resData['pid'].content.replace("https://doi.org/", ""));
207
              result.DOIs.push((resData['pid'].content+"").replace("https://doi.org/", ""));
208 208
            }
209 209
          }
210 210
        } else {

Also available in: Unified diff