mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Fix InDesign bug with _.sortBy.
Former-commit-id: 3ed2c5fcb02885a9b3563cf9081f6e2af8826c6d
This commit is contained in:
@@ -256,7 +256,11 @@
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return ai < bi ? -1 : 1;
|
||||
// The JS engine embedded in Adobe applications like InDesign has a buggy
|
||||
// `Array#sort` implementation that causes it, under certain circumstances,
|
||||
// to return the same value for `a` and `b`.
|
||||
// See https://github.com/jashkenas/underscore/pull/1247
|
||||
return ai < bi ? -1 : (ai > bi ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user