@@ -168,9 +168,13 @@ private void handle(JsonObject templateObject) {
168168 webview .addProperty ("url" , this .url );
169169 webview .addProperty ("jump_url" , this .jumpUrl );
170170 webview .addProperty ("pagepath" , this .pagePath );
171- webview .addProperty ("enable_webview_click" , this .enableWebviewClick );
171+ if (this .enableWebviewClick != null ) {
172+ webview .addProperty ("enable_webview_click" , this .enableWebviewClick );
173+ }
172174 webview .addProperty ("height" , this .height );
173- webview .addProperty ("hide_title" , this .hideTitle );
175+ if (this .hideTitle != null ) {
176+ webview .addProperty ("hide_title" , this .hideTitle );
177+ }
174178 templateObject .add ("webview" , webview );
175179 break ;
176180 }
@@ -236,9 +240,13 @@ private void handleBatch(JsonObject templateObject) {
236240 webview .addProperty ("url" , this .url );
237241 webview .addProperty ("jump_url" , this .jumpUrl );
238242 webview .addProperty ("pagepath" , this .pagePath );
239- webview .addProperty ("enable_webview_click" , this .enableWebviewClick );
243+ if (this .enableWebviewClick != null ) {
244+ webview .addProperty ("enable_webview_click" , this .enableWebviewClick );
245+ }
240246 webview .addProperty ("height" , this .height );
241- webview .addProperty ("hide_title" , this .hideTitle );
247+ if (this .hideTitle != null ) {
248+ webview .addProperty ("hide_title" , this .hideTitle );
249+ }
242250 JsonObject dataObject = new JsonObject ();
243251 dataObject .addProperty ("type" , WxCpConsts .WorkBenchType .WEBVIEW );
244252 dataObject .add ("webview" , webview );
0 commit comments