tuupola/lazyload

Option failure_limit does not work

Brandon0 opened this issue · 1 comments

When the failure_limit option was added back on Dec-01, the code to maintain backwards compatibility was added incorrectly. The code checks for option.failurelimit to not strictly equal null. If the option is omitted (as it should be going forward), the check still returns true (null !== undefined) and then incorrectly overrides any specified value for option.failurelimit to 0. I believe the proper check should be:

if (undefined !== options.failurelimit) {}

Fixed. Thanks for the heads up.