Open volumetric opened 9 years ago
Ahh shoot, yah. We should probably not throw and skip in that case. I'd really appreciate a PR for this fix if you have a moment.
I'm currently thinking of ways to make the API a little more robust to handle cases like this, and intermediate parsing. Right now it's sort of all or nothing.
Hi @matthewmueller Can you tell me where i should be looking, Thanks.
@volumetric here's where the error is:
https://github.com/lapwinglabs/x-ray/blob/master/index.js#L95
I am using the composition of instances to go to other pages and pick data from there for a collection. something like this.
i am picking the URLs from a certain element with given selector
.pqr a@href
, but some of those URL values are empty and when the x() function is called with an empty URL it gives the error:[Error: is not a URL]
Because of this, i am not able to get the captured values for the rest of the urls for which
.pqr a@href
is not empty but a valid URL. i am not able to find a way to avoid the x() instance calls on empty URLs.One possible solution could be, if the call on x() with an empty URL should just quietly die, instead of throwing an error, which tips off the rest of the instance calls.
Would highly appreciate if someone can help me in this. Thanks