Fixed the issue when the location node is an array with multiple locations which contain the `.js` file extension