Skip to content

Commit 04111a3

Browse files
Ensuring a cash collection gets printed as array-like in Chrome
1 parent 0681cd1 commit 04111a3

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/core/cash.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ function cash ( selector, context ) {
4545
const fn = cash.fn = cash.prototype = Cash.prototype = {
4646
constructor: cash,
4747
__cash: true,
48-
length: 0
48+
length: 0,
49+
splice // Ensures a cash collection gets printed as array-like in Chrome
4950
};

src/core/variables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
const doc = document,
33
win = window,
4-
{filter, indexOf, map, push, reverse, slice} = Array.prototype;
4+
{filter, indexOf, map, push, reverse, slice, splice} = Array.prototype;
55

66
const idRe = /^#[\w-]*$/,
77
classRe = /^\.[\w-]*$/,

0 commit comments

Comments
 (0)