> Thank you. And thank you for making it open source.
Sure thing. All browser extension source code is available to you anyhow, even if the author doesn't publish it.
> Why is it sometimes returning undefined?
Looks like a simple bug as some folks below have pointed out. It doesn't impact the functionality of the extension in any way here.