https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42309 --- Comment #6 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- (In reply to Brendan Lawlor from comment #5)
(In reply to Caroline Cyr La Rose from comment #2)
I made the same correction as Jonathan did in bug 42277. (Copying without really understanding what I'm doing, so please let me know if this is not correct! But I figured I could manage a 1-character modification...)
This is called the optional chaining operator. It's used like the . operator for accessing an object's properties or calls to a function. It can be used when the property or the function might not be available, then it returns undefined instead of throwing an error. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/ Optional_chaining
So in this case when there's no cash registers then the variable crtable isn't initialized and isn't able to call the function DataTable() without returning an error.
Thanks for the explanation Brendan! -- You are receiving this mail because: You are watching all bug changes.