We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc502d0 commit ef2ef9bCopy full SHA for ef2ef9b
web/search.dart
@@ -528,12 +528,13 @@ String _decodeHtml(String html) {
528
final _relativePath = () {
529
var body = document.querySelector('body')!;
530
var relativePath = '';
531
- if (body.getAttribute('data-using-base-href') == 'true') {
532
- relativePath = body.getAttribute('href')!;
533
- } else if (body.getAttribute('data-base-href') == '') {
534
- relativePath = './';
535
- } else {
536
- relativePath = body.getAttribute('data-base-href')!;
+ if (body.getAttribute('data-using-base-href') == 'false') {
+ var baseHref = body.getAttribute('data-base-href');
+ if (baseHref == null || baseHref.isEmpty) {
+ relativePath = './';
+ } else {
+ relativePath = baseHref;
537
+ }
538
}
539
var href = Uri.parse(window.location.href);
540
var base = href.resolve(relativePath);
0 commit comments