File tree Expand file tree Collapse file tree 4 files changed +29
-3
lines changed
packages/browser-extension Expand file tree Collapse file tree 4 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " Alpine.js devtools - Early Access" ,
33 "description" : " DevTools extension for debugging Alpine.js applications." ,
4- "version" : " 2.7.3 " ,
4+ "version" : " 2.7.4 " ,
55 "manifest_version" : 3 ,
66 "icons" : {
77 "16" : " icons/16.png" ,
Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ <h2 x-text="title"></h2>
2626 < p > < button @click ="onClick " data-testid ="click-target "> Click me</ button > </ p >
2727 </ div >
2828
29+ < section x-data ="page ">
30+ < h1 x-text ="titleDisplay "> </ h1 >
31+ < div x-data ="myData ">
32+ < p x-text ="textDisplay "> </ p >
33+ </ div >
34+ </ section >
35+
2936 < script >
3037 document . addEventListener ( 'alpine:initializing' , ( ) => {
3138 Alpine . data ( 'parent' , ( ) => ( {
@@ -47,6 +54,22 @@ <h2 x-text="title"></h2>
4754 return this . messages . join ( ', ' ) ;
4855 } ,
4956 } ) ) ;
57+
58+ Alpine . data ( 'page' , ( ) => ( {
59+ title : 'test' ,
60+
61+ get titleDisplay ( ) {
62+ return this . title . toUpperCase ( ) ;
63+ } ,
64+ } ) ) ;
65+
66+ Alpine . data ( 'myData' , ( ) => ( {
67+ text : 'hello world' ,
68+
69+ get textDisplay ( ) {
70+ return this . text + '!' ;
71+ } ,
72+ } ) ) ;
5073 } ) ;
5174 </ script >
5275 </ body >
Original file line number Diff line number Diff line change 11{
22 "name" : " browser-extension" ,
33 "private" : true ,
4- "version" : " 2.7.3 " ,
4+ "version" : " 2.7.4 " ,
55 "description" : " Alpine.js devtools with Chrome manifest v3 compatibility" ,
66 "type" : " module" ,
77 "scripts" : {
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ export function init(forceStart = false) {
120120 */
121121 getAlpineDataInstance ( node , config = { getRawInstance : true } ) {
122122 if ( this . isV3 ) {
123- if ( config . getRawInstance || node . _x_dataStack . length === 1 ) {
123+ if ( config . getRawInstance || node . _x_dataStack ? .length === 1 ) {
124124 return node . _x_dataStack ?. [ 0 ] ;
125125 }
126126 // For accessing the data contents, we need to inherit scoped data.
@@ -338,6 +338,9 @@ export function init(forceStart = false) {
338338 // But ensure Alpine recomputes this effect if any of
339339 // the parents change as they could be used in the getter
340340 Object . keys ( stack ) . forEach ( ( k ) => {
341+ if ( recursionDepth >= 10 ) {
342+ return ;
343+ }
341344 visit ( stack , k ) ;
342345 } ) ;
343346 }
You can’t perform that action at this time.
0 commit comments