Skip to content

Fixing string.replace is not a function.#33

Open
rokyed wants to merge 1 commit into
fredericd:masterfrom
rokyed:patch-1
Open

Fixing string.replace is not a function.#33
rokyed wants to merge 1 commit into
fredericd:masterfrom
rokyed:patch-1

Conversation

@rokyed

@rokyed rokyed commented May 12, 2021

Copy link
Copy Markdown

No description provided.

@fredericd

Copy link
Copy Markdown
Owner

Thanks for your patch. Do you have sample data triggering the error/warning solved by your patch?

@rokyed

rokyed commented May 21, 2021

Copy link
Copy Markdown
Author

Thanks for your patch. Do you have sample data triggering the error/warning solved by your patch?

@fredericd if the data appended to the Record is a Number, then this error will rise. I think it's a good idea to fix it at this level, although I will understand if you won't. From what I've read over MARC it should have no implication.

@fredericd

Copy link
Copy Markdown
Owner

@rokyed could you show me how and where you add a Number to a biblio Record? It will allow me to add a new entry to the module test suite.

@rokyed

rokyed commented May 21, 2021

Copy link
Copy Markdown
Author

@fredericd

/*redacted*/

let rec = new Record();
rec.append(['001', 123456]);
let resp = rec.as('marcxml');

/*redacted*/

@fredericd

Copy link
Copy Markdown
Owner

It doesn't trigger an error/warning for me.

@rokyed

rokyed commented May 23, 2021

Copy link
Copy Markdown
Author

@fredericd that was the only difference in my code that removed the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants