Open
Description
https://codeclimate.com/github/benchpressjs/benchpressjs/issues
If you scroll down to the two Identical blocks of code found in 2 locations. Consider refactoring.
issues, you will see that it detects
return Promise.try(() => {
Benchpress.cache[template] = Benchpress.cache[template] || load(template);
return Benchpress.cache[template];
}).then((templateFunction) => {
if (block) {
and
return Promise.try(() => {
const cached = compileRenderCache.get(hash);
if (cached) {
compileRenderCache.ttl(hash);
return cached;
as identical when the only thing even similar about them is Promise.try(() => {
.
This is super annoying. Is it some kind of diffing or hashing bug? Should I report it on the flay repository?
Metadata
Metadata
Assignees
Labels
No labels