1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix http in node close wrinkle if cors enabled but not used.

This commit is contained in:
Dave C-J 2014-10-29 18:26:09 +00:00
parent 98b875c4a0
commit a1830def8e

View File

@ -95,10 +95,12 @@ module.exports = function(RED) {
}
if (RED.settings.httpNodeCors) {
var route = RED.httpNode.route['options'];
for (var j = 0; j<route.length; j++) {
if (route[j].path == this.url) {
route.splice(j,1);
//break;
if (route) {
for (var j = 0; j<route.length; j++) {
if (route[j].path == this.url) {
route.splice(j,1);
//break;
}
}
}
}