Skip to content

Commit dab6247

Browse files
authored
Reworking RippleArray to be fully reactive (#171)
* reworking RippleArray * take out commented code * fixes, 2 skipped tests due to ripple bug * re-enable tests, quick fix
1 parent 12d2008 commit dab6247

7 files changed

Lines changed: 1871 additions & 83 deletions

File tree

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ playground/src
2424
# OS-specific
2525
.DS_Store
2626

27+
# VS Code settings
28+
.vscode/
29+
30+
# Chrome Debugger
31+
.chrome-debug-profile/
32+
2733
tmp
2834
dist
29-
debug
35+
debug

packages/ripple/src/compiler/phases/3-transform/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,8 @@ const visitors = {
10011001
const left = node.left;
10021002

10031003
if (left.type === 'MemberExpression') {
1004-
if (left.property.type === 'Identifier' && is_tracked_name(left.property.name)) {
1004+
// need to capture setting length of array to throw a runtime error
1005+
if (left.property.type === 'Identifier' && (is_tracked_name(left.property.name) || left.property.name === 'length')) {
10051006
if (left.property.name !== '$length') {
10061007
return b.call(
10071008
'$.set_property',

0 commit comments

Comments
 (0)