dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

JS errors when searching API

Open dnfield opened this issue 2 years ago • 6 comments

go to https://api.dart.dev/dev/2.19.0-216.0.dev/index.html

Open the console

Start typing in the API search box

observe JS errors

js_helper.dart:1124 Uncaught RangeError (start): Invalid value: Not in inclusive range 0..1: 6
    at Object.b (js_helper.dart:1124:37)
    at Object.b6 (errors.dart:358:7)
    at b_.l (js_string.dart:155:22)
    at b_.F (js_string.dart:153:10)
    at iz.$2 (search.dart:382:36)
    at ip.$2 (search.dart:424:5)
    at ip.$1 (search.dart:406:3)
    at ii.$1 (search.dart:443:5)
    at no (js_helper.dart:1836:14)
    at HTMLInputElement.<anonymous> (js_helper.dart:1868:1)

image

Also observable on https://master-api.flutter.dev

@kevmoo @srawlins fyi

dnfield avatar Sep 20 '22 03:09 dnfield

CC @keertip

kevmoo avatar Sep 20 '22 03:09 kevmoo

Also CC @srawlins

kevmoo avatar Sep 20 '22 16:09 kevmoo

I am able to reproduce the problem, now trying to figure out the problem. Looks like the exception does not occur all the time.

keertip avatar Sep 20 '22 21:09 keertip

Have you made progress on this one @keertip ? I haven't looked at it.

srawlins avatar Sep 27 '22 15:09 srawlins

Meant to update. I can reproduce on the site, but not seeing the exceptions when running locally.

keertip avatar Sep 28 '22 02:09 keertip

Will wait for a new version of dartdoc and check again to reproduce

keertip avatar Sep 28 '22 17:09 keertip

CC @keertip this has been re-worked at least one more time recently. May be fixed.

srawlins avatar Dec 27 '22 18:12 srawlins

Just looked at https://master-api.flutter.dev/ – I think @srawlins got it fixed!

kevmoo avatar Dec 28 '22 19:12 kevmoo