File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 2424 < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.1.3/flatly/bootstrap.min.css "
2525 integrity ="sha256-O7FfDCaEf9kSRN9b9kmWu8C3rhL1hxEpPHp+CTZ4pMk= " crossorigin ="anonymous " />
2626 < link rel ="stylesheet " href ="styles.css " />
27+
28+ < script src ="https://cdn.polyfill.io/v2/polyfill.js?features=Array.from,Map&flags=gated "> </ script >
2729</ head >
2830
2931< body >
Original file line number Diff line number Diff line change @@ -38,12 +38,16 @@ function displayPattern(pattern: string) {
3838}
3939
4040function onClickGenerate ( ) {
41- if ( ! $form . reportValidity ( ) ) {
42- return ;
41+ try {
42+ if ( ! $form . reportValidity ( ) ) {
43+ return ;
44+ }
45+ } catch ( ex ) {
46+ // Ignore browsers that don't support reportValidity()
4347 }
4448
4549 let words = $input . value ;
46- const delimiter = $delimiter . selectedOptions [ 0 ] . value ;
50+ const delimiter = $delimiter . options [ $delimiter . selectedIndex ] . value ;
4751 const isCaseSensitive = $caseSensitive . checked ;
4852 const isWhitespaceTrimmed = $trim . checked ;
4953
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { ICharTrie } from '../types/charTrie';
99 */
1010export function build ( charTrie : ICharTrie ) : string {
1111 const patternSegments = Array . from (
12- charTrie ,
12+ [ ... charTrie ] ,
1313 ( [ head , suffixTrie ] ) => `${ head } ${ build ( suffixTrie ) } `
1414 ) ;
1515
You can’t perform that action at this time.
0 commit comments