@@ -405,7 +405,7 @@ window.component('push.popup', function(popup) {
405
405
valuePers : l . messageTitlePers ,
406
406
valueCompiled : message . titleCompile . bind ( message , l . value , true ) ,
407
407
placeholder : function ( ) { return l . value === 'default' ? t ( 'pu.po.tab2.mtitle.placeholder' ) : messageTitleHTML ( 'default' ) || t ( 'pu.po.tab2.mtitle.placeholder' ) ; } ,
408
- persOpts : push . PERS_OPTS . length ? push . PERS_OPTS : undefined ,
408
+ persOpts : push . PERS_OPTS && push . PERS_OPTS . length ? push . PERS_OPTS : undefined ,
409
409
onToggle : function ( v ) { emojiPersOpen = v ; }
410
410
} ) ;
411
411
l . messageCtrl = new C . emoji . controller ( {
@@ -416,7 +416,7 @@ window.component('push.popup', function(popup) {
416
416
valueCompiled : message . messageCompile . bind ( message , l . value , true ) ,
417
417
textarea : true ,
418
418
placeholder : function ( ) { return l . value === 'default' ? t ( 'pu.po.tab2.placeholder' ) : messageMessageHTML ( 'default' ) || t ( 'pu.po.tab2.placeholder' ) ; } ,
419
- persOpts : push . PERS_OPTS . length ? push . PERS_OPTS : undefined ,
419
+ persOpts : push . PERS_OPTS && push . PERS_OPTS . length ? push . PERS_OPTS : undefined ,
420
420
onToggle : function ( v ) { emojiPersOpen = v ; }
421
421
} ) ;
422
422
@@ -1238,7 +1238,7 @@ window.component('push.popup', function(popup) {
1238
1238
el . querySelectorAll ( '.pers' ) . forEach ( function ( el ) {
1239
1239
el . textContent = el . getAttribute ( 'data-fallback' ) ;
1240
1240
1241
- var name = push . PERS_OPTS . filter ( function ( opt ) { return opt . value ( ) === el . getAttribute ( 'data-key' ) ; } ) [ 0 ] ;
1241
+ var name = push . PERS_OPTS && push . PERS_OPTS . filter ( function ( opt ) { return opt . value ( ) === el . getAttribute ( 'data-key' ) ; } ) [ 0 ] ;
1242
1242
if ( name ) {
1243
1243
name = name . title ( ) ;
1244
1244
}
@@ -1275,7 +1275,7 @@ window.component('push.popup', function(popup) {
1275
1275
el . querySelectorAll ( '.pers' ) . forEach ( function ( el ) {
1276
1276
el . textContent = el . getAttribute ( 'data-fallback' ) ;
1277
1277
1278
- var name = push . PERS_OPTS . filter ( function ( opt ) { return opt . value ( ) === el . getAttribute ( 'data-key' ) ; } ) [ 0 ] ;
1278
+ var name = push . PERS_OPTS && push . PERS_OPTS . filter ( function ( opt ) { return opt . value ( ) === el . getAttribute ( 'data-key' ) ; } ) [ 0 ] ;
1279
1279
if ( name ) {
1280
1280
name = name . title ( ) ;
1281
1281
}
0 commit comments