File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const WebpartFieldFillCheck = ( tabsData ) => {
2+ if ( tabsData ) {
3+ if ( tabsData ?. length === 0 ) {
4+ return false ;
5+ } else {
6+ const values = Object . values ( tabsData ?. [ 0 ] ) ;
7+ console . log ( values , "ffff" ) ;
8+
9+ //! Function to check if a value contains HTML tags
10+ const isHTMLString = ( value ) => {
11+ //! Regular expression to detect HTML tags
12+ const htmlRegex = / < [ ^ > ] + > / g;
13+ return typeof value === "string" && htmlRegex . test ( value ) ;
14+ } ;
15+
16+ return values ?. some (
17+ //! Return false if it's an HTML string
18+ ( value ) => value !== "" && ! isHTMLString ( value )
19+ ) ;
20+ }
21+ }
22+ return false ;
23+ } ;
24+
25+
26+
27+
28+
29+
30+ const WebpartFieldFillCheck = ( tabsData ) => {
31+ if ( tabsData ) {
32+ if ( tabsData ?. length === 0 ) {
33+ return false ;
34+ } else {
35+ return Object . values ( tabsData ?. [ 0 ] ) ?. some (
36+ ( value ) => value !== ""
37+ ) ;
38+ }
39+ }
40+ } ;
You can’t perform that action at this time.
0 commit comments