dmhacker / alexa-youtube-skill

Allows Alexa to play audio from YouTube videos
MIT License
243 stars 109 forks source link

Fix issue Unhandled rejection Error: Invalid application #6

Closed andrewdavisdev closed 7 years ago

andrewdavisdev commented 7 years ago

Fix issue when testing with Lambda only or with the Alexa JSON test utterances, req.applicationId can be null and the applicationId is nested under reg.data.session.application.applicationId instead. Therfore, check to see if req.data.session is defined first and if so get the applicationId there first, if not defined, then get it from req.applicationId. This should fix issue #5 .

dmhacker commented 7 years ago

Looks good!