jembi/openhim-core-js — pull request #254 by BMartinos (2014-11-03 12:48:06+00:00)
Title: Updated router to make a fresh "sendRequest" promise for each route

This PR relates to issue: https://github.com/jembi/openhim-core-js/issues/250
The problem was with the scope of the route and options objects when it reached the 'then' method. An instance of the last route that went through the loop was stored and used on all promises being executed. Created a function to create a fresh promise for each secondary route. Thanks @devcritter for pointing me in the right direction