import { Layer } from './types' ; const markIsOnlyText = ( data , parent ) => { for ( var i = 0 ; i < data . length ; i ++ ) { if ( ! data [ i ] . children && parent . children . length == 1 ) { if ( data [ i ] . type == 'Text' ) { parent . isOnlyText = true ; } } if ( data [ i ] . children ) { markIsOnlyText ( data [ i ] . children , data [ i ] ) ; } } return data ; } ; export default markIsOnlyText ;