andyet/ICanHaz.js — Issue #43: reload of ich wipes out templates
Author: dtipson
Created: 2012-01-23 18:31:32+00:00
State: open

Pretty easy to work around, but when including ICH with yepnope, it seems possible for the library to reinitialize in some edges cases, and in doing so, all the previously imported templates will be wiped out (since they are tagged as already having been processed, so the new copy of ich overwrites the old one and then finds no new templates to import from the DOM). I've just been adding window.ich = window.ich || ich= { all the ich code...; } as a workaround (basically, if the library is already included, don't bother to overwrite it with a new copy), but not sure that's the best/right solution. The right solution is not to include it twice, obviously, but it's not always possible to avoid in some situations. :)