This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Commit 362b1cf
committed
feat(isArray): support Array subclasses in
Closes #15533
BREAKING CHANGE:
`angular.isArray` is used by `angular.copy`, which in turn is used internally by the dirty
checking logic. That's why this change affects the way objects are copied and watched by AngularJS.
Objects that prototypally inherit from `Array` (e.g. MobX observable arrays, see #15533) weren't
previously recognized as arrays, now they are. This change also affects `angular.merge`,
`angular.forEach`, and `angular.equals`.
Previously, `angular.isArray` was an alias for and thus worked exactly as `Array.isArray`.angular.isArray
1 parent 8b69d91 commit 362b1cf
2 files changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
| 222 | + | |
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
| |||
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
638 | | - | |
| 637 | + | |
639 | 638 | | |
640 | 639 | | |
641 | 640 | | |
642 | 641 | | |
643 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1254 | 1264 | | |
1255 | 1265 | | |
1256 | 1266 | | |
| |||
0 commit comments