File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ function generate_page( string $html, array $options ): string {
47
47
'htmlApiDoctypeName ' => $ htmlapi_response ['result ' ]['doctypeName ' ] ?? null ,
48
48
'htmlApiDoctypePublicId ' => $ htmlapi_response ['result ' ]['doctypePublicId ' ] ?? null ,
49
49
'htmlApiDoctypeSytemId ' => $ htmlapi_response ['result ' ]['doctypeSystemId ' ] ?? null ,
50
+ 'treeWarnings ' => $ htmlapi_response ['result ' ]['warnings ' ] ?? array (),
50
51
'normalizedHtml ' => $ htmlapi_response ['normalizedHtml ' ] ?? '' ,
51
52
52
53
'playbackLength ' => isset ( $ htmlapi_response ['result ' ]['playback ' ] )
@@ -165,8 +166,8 @@ class="context-html"
165
166
</div>
166
167
</div>
167
168
168
- <div data-wp-bind--hidden="!state.htmlapiResponse.result.warnings.0 ">
169
- <template data-wp-each="state.htmlapiResponse.result.warnings ">
169
+ <div data-wp-bind--hidden="!state.treeWarnings.length ">
170
+ <template data-wp-each="state.treeWarnings ">
170
171
<p data-wp-text="context.item" class="error-holder"></p>
171
172
</template>
172
173
</div>
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ let mutationObserver = null;
67
67
*
68
68
*
69
69
* @typedef State
70
+ * @property {ReadonlyArray<string> } treeWarnings
70
71
* @property {string|null } selector
71
72
* @property {string|null } selectorErrorMessage
72
73
* @property {boolean } showClosers
@@ -145,6 +146,10 @@ const store = createStore(NS, {
145
146
} ;
146
147
} ,
147
148
149
+ get treeWarnings ( ) {
150
+ return store . state . htmlapiResponse . result ?. warnings ?? [ ] ;
151
+ } ,
152
+
148
153
get playbackTree ( ) {
149
154
if ( store . state . playbackPoint === null ) {
150
155
return undefined ;
You can’t perform that action at this time.
0 commit comments