Skip to content

Instantly share code, notes, and snippets.

@asonge
Forked from cutecycle/resolveLines
Created May 22, 2016 01:25
Show Gist options
  • Save asonge/0111bceeedd4aab6b32451f32516ff5e to your computer and use it in GitHub Desktop.
Save asonge/0111bceeedd4aab6b32451f32516ff5e to your computer and use it in GitHub Desktop.
Array.find crash at length = 1447
var look = function(lineid) {
var find;
find = (lines_json.find( function(value) {
return (value.lineid === lineid);
}));
if(find.speakerid !== "" || (typeof find.speakerid === "undefined")) {
find.retrievedSpeaker = line(entity(find.speakerid).entityname);
}
lines_out.push(find);
if(find.advance_lineid !== "" || (typeof find.advance_lineid === "undefined")) {
look(find.advance_lineid);
}
}
look(lineid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment