camp.handle problem when path[0] is not defined #15

Closed
jankeromnes opened this Issue Feb 27, 2012 · 5 comments

Comments

Projects
None yet
2 participants
@jankeromnes
Collaborator

jankeromnes commented Feb 27, 2012

Works:

camp.handle('/types.html', function (query, path) {
  path[0] = '/types.html';
  camp.server.emit('gottypes', data);
}, function gottypes (data) {
  return data;
});

Doesn't work (the page is never delivered):

camp.handle('/types.html', function (query, path) {
  // nothing
  camp.server.emit('gottypes', data);
}, function gottypes (data) {
  return data;
});

I think this is a problem.

@espadrine

This comment has been minimized.

Show comment
Hide comment
@espadrine

espadrine Mar 1, 2012

Owner

Cannot reproduce. I tried that exact snippet of code (with a sensible value for data), and it works fine.

Tell me more about it. console.log it.

Owner

espadrine commented Mar 1, 2012

Cannot reproduce. I tried that exact snippet of code (with a sensible value for data), and it works fine.

Tell me more about it. console.log it.

@jankeromnes

This comment has been minimized.

Show comment
Hide comment
@jankeromnes

jankeromnes Mar 1, 2012

Collaborator

I'll try to reproduce soon. The snippet wasn't exactly like that: the camp.emit really was deferred. I'll let you know.

Collaborator

jankeromnes commented Mar 1, 2012

I'll try to reproduce soon. The snippet wasn't exactly like that: the camp.emit really was deferred. I'll let you know.

@espadrine

This comment has been minimized.

Show comment
Hide comment
@espadrine

espadrine Mar 1, 2012

Owner

I'll be waiting then.

Owner

espadrine commented Mar 1, 2012

I'll be waiting then.

@espadrine

This comment has been minimized.

Show comment
Hide comment
@espadrine

espadrine Apr 9, 2012

Owner

Can you see if the problem still occurs with 9e3d2e2 ?

Owner

espadrine commented Apr 9, 2012

Can you see if the problem still occurs with 9e3d2e2 ?

@espadrine

This comment has been minimized.

Show comment
Hide comment
@espadrine

espadrine Apr 16, 2012

Owner

@jankeromnes I'll close this issue tomorrow unless you find that it still happens to you.

Owner

espadrine commented Apr 16, 2012

@jankeromnes I'll close this issue tomorrow unless you find that it still happens to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment