_.map with a native function produces wrong or NaN results
Symptom: _.map(['6', '8', '10'], parseInt) returns [6, NaN, 2] instead of [6, 8, 10].
Cause: _.map invokes its iteratee with three arguments: (value, index, collection). parseInt(string, radix) treats its second argument as a radix, so index gets used as the radix for every element after the first.
Fix: Cap the number of arguments the function receives with _.ary, or use a wrapping function:
_.map(['6', '8', '10'], _.ary(parseInt, 1));
// => [6, 8, 10]See Iteratee shorthands: watch for methods that forward extra arguments for the general pattern.
A method call "did nothing" or changed data you didn't expect it to
Symptom: After calling an Array or Object method, the original variable changed even though you expected a new value — or the opposite, you expected a mutation and got a copy instead.
Cause: Some Lodash methods mutate their input and return the same reference; most return a new value and leave the input untouched. Which one applies is documented per method, not by category.
Fix: Check the method's reference entry for a "this method mutates" note before relying on either behavior. See Mutating and non-mutating methods for the list of commonly mutating methods.
_.isEqual(NaN, NaN) returns true, unlike ===
Symptom: Two NaN values compare equal with _.isEqual but not with ===.
Cause: This is expected. _.isEqual and other Lodash comparisons use the SameValueZero algorithm, which treats NaN as equal to itself. === does not.
Fix: No fix needed — this is documented behavior. If you specifically need === semantics, compare with === directly instead of _.isEqual.
Deep-write methods silently ignore a __proto__ key
Symptom: Setting a __proto__ path through _.set, or merging an object that has that key with merge, has no visible effect.
Cause: This is intentional. Deep-write methods such as set and merge block writes to __proto__ and constructor.prototype to prevent prototype pollution. See Security for the full explanation.
Fix: If you need to store a value under a literal key named __proto__ or constructor, use Object.defineProperty or a Map instead of a deep-write Lodash method.
A debounced or throttled function never seems to fire
Symptom: A debounced or throttled function appears not to run at all.
Cause: With { trailing: false }, the function only runs on the leading edge of the wait window — calling it repeatedly within that window produces exactly one invocation, on the first call, and none afterward until the window elapses.
var fn = _.debounce(doWork, 50, { leading: true, trailing: false });
fn(); fn(); fn();
// => doWork runs once, immediately, not three times and not after 50msFix: Confirm your leading/trailing options match what you expect, and remember wait is measured in milliseconds from the last call by default (trailing: true), not the first.
Changing _.templateSettings doesn't affect a template you already compiled
Symptom: After changing _.templateSettings.interpolate, a template compiled before the change still uses the old delimiter.
Cause: _.template reads templateSettings (or the options you pass) at compile time, not at call time. Changing the global settings only affects templates compiled afterward.
Fix: Recompile the template after changing settings, or pass delimiters explicitly through the options argument on each _.template call instead of mutating the shared global.
Still stuck
Search the API reference for the exact method you're calling — every entry lists its parameters, return value, and a runnable example you can compare against your own call.