Bugzilla – Attachment 150248 Details for
Bug 33616
JavaScript error in when using claims return button in checkout table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33616: Make sure match() is evaluated against a string
Bug-33616-Make-sure-match-is-evaluated-against-a-s.patch (text/plain), 1.40 KB, created by
Lucas Gass (lukeg)
on 2023-04-26 15:30:35 UTC
(
hide
)
Description:
Bug 33616: Make sure match() is evaluated against a string
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-04-26 15:30:35 UTC
Size:
1.40 KB
patch
obsolete
>From b777853c6edd8dfa678cf29d049b1df9c4852fa5 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 26 Apr 2023 15:28:49 +0000 >Subject: [PATCH] Bug 33616: Make sure match() is evaluated against a string > >To Test: > >1. Set ClaimReturnedLostValue to a LOST value >2. Check out an item to a patron. >3. Click the Claim returned button within the checkout table. >4. Get spinning icon in place of the button >5. In the web developer tools console: Uncaught TypeError: value.match is not a function >6. Apply patch >7. Try 2 - 3 again. This time the spinning icon should turn into a grey button with the correct date. >8. There should no longer be a console error. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >index 7a54fa773a..0ad4b422e9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >@@ -43,7 +43,7 @@ > if(!value) return ''; > var tz = (options&&options.tz)||def_tz; > var m = dayjs(value); >- if ( ! value.match(/^\d{4}-\d{2}-\d{2}$/ ) ) { >+ if ( ! value.toString().match(/^\d{4}-\d{2}-\d{2}$/ ) ) { > m = m.tz(tz); > } > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33616
:
150248
|
150249