wookayin / alfred-papers3-workflow

🔎 An Alfred 2/3 workflow to search Papers3 items
MIT License
43 stars 5 forks source link

[fix] Avoid AttributeError and IndexError in checking title variable #1

Closed noshita closed 7 years ago

noshita commented 7 years ago

Following errors occur:

To avoid these errors, some conditions are added.

wookayin commented 7 years ago

Hi @noshita, thanks for your contribution. Although the patch looks good, but is the empty title equals applescript.kMissingValue (which is an instance of AEType), isn't it? If so, I suggest that an equality check would suffice, instead of checking whether it is not an instance of unicode (or, str). Could you please test it?

noshita commented 7 years ago

Hi @wookayin! Thank you for your guiding. I tested your suggestion and arranged the style by following yours.

wookayin commented 7 years ago

Thank you, it looks good to me and I just merged it.