Preface: I have no idea what I'm doing with Factorio modding, but I am a programmer so I gave it a shot.
It appears that some mods add a recipe that doesn't have a result. I don't know what mods do this, or why they do it. The fix I found for preventing the "results (a nil value)" crash is to check if the recipe.results is empty after it's supposed to be populated.
Add this on line 72, immediately after the end of the block that starts on line 60:
if not recipe.results then
goto skipResource
end