Selector not found
amol-16 opened this issue · 6 comments
amol-16 commented
For some pages ->
function sort(paths: Iterator<Path> & Iterable<Path>): Path[] {
return Array.from(paths).sort((a, b) => penalty(a) - penalty(b))
}
Output of "Array.from(paths)" is returning => [ ] (empty array)
Adding a polyfill substitute in this method is solving the issue ->
ex- code
function transformToArray <a>(a: Iterator<a>) {
let result: a[] = []
let current = a.next()
while(current.done == false) {
result.push(current.value)
current = a.next()
}
return result
}
function sort(paths: Iterator<Path> & Iterable<Path>): Path[] {
return transformToArray(paths).sort((a, b) => penalty(a) - penalty(b))
}
Let me know, I can raise a PR for the same.
antonmedv commented
Yes, let’s go a PR.
amol-16 commented
@antonmedv PR for above suggested change -> #63
antonmedv commented
For some pages ->
Can you link an example there I can check it?
amol-16 commented
@antonmedv Example page -> https://www.sanaullastore.com/
amol-16 commented
added example page and screenshot of error object from library