handle event not existing a little better.

This commit is contained in:
Isaac Connor 2021-01-25 18:49:03 -05:00
parent 4b5052c351
commit dc9c7a7e15
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,7 @@ var SCALE_BASE = <?php echo SCALE_BASE ?>;
var connKey = '<?php echo $connkey ?>'; var connKey = '<?php echo $connkey ?>';
var eventData = { var eventData = {
<?php if ( $Event->Id() ) { ?>
Id: '<?php echo $Event->Id() ?>', Id: '<?php echo $Event->Id() ?>',
Name: '<?php echo $Event->Name() ?>', Name: '<?php echo $Event->Name() ?>',
MonitorId: '<?php echo $Event->MonitorId() ?>', MonitorId: '<?php echo $Event->MonitorId() ?>',
@ -61,6 +62,7 @@ var eventData = {
EmailedStr: '<?php echo $Event->Emailed ? translate('Yes') : translate('No') ?>', EmailedStr: '<?php echo $Event->Emailed ? translate('Yes') : translate('No') ?>',
Archived: <?php echo $Event->Archived?'true':'false' ?>, Archived: <?php echo $Event->Archived?'true':'false' ?>,
Emailed: <?php echo $Event->Emailed?'true':'false' ?> Emailed: <?php echo $Event->Emailed?'true':'false' ?>
<?php } ?>
}; };
var eventDataStrings = { var eventDataStrings = {