Skip to content

Commit 309db13

Browse files
authored
Update bootstrap.js
1 parent 282af7c commit 309db13

File tree

1 file changed

+2
-2
lines changed
  • src/Security/samples/ClaimsTransformation/wwwroot/lib/bootstrap/dist/js

1 file changed

+2
-2
lines changed

src/Security/samples/ClaimsTransformation/wwwroot/lib/bootstrap/dist/js/bootstrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ if (typeof jQuery === 'undefined') {
511511
var $this = $(this)
512512
var href = $this.attr('href')
513513
if (href) {
514-
href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
514+
href = href && href.indexOf('#') !== -1 ? href.slice(href.lastIndexOf('#')) : href
515515
}
516516

517517
var target = $this.attr('data-target') || href
@@ -705,7 +705,7 @@ if (typeof jQuery === 'undefined') {
705705
function getTargetFromTrigger($trigger) {
706706
var href
707707
var target = $trigger.attr('data-target')
708-
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
708+
|| ((href = $trigger.attr('href')) && (href.indexOf('#') !== -1 ? href.slice(href.lastIndexOf('#')) : href)) // strip for ie7 (safe)
709709

710710
return $(document).find(target)
711711
}

0 commit comments

Comments
 (0)