config-editor-base 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -437,37 +437,37 @@ var resetLocalSchemaList = function resetLocalSchemaList() {
437
437
  var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
438
438
  return function (dispatch) {
439
439
  var contentJSON = content;
440
- console.log("contentJSON", contentJSON);
441
- console.log("contentJSON.can_1", contentJSON.can_1);
442
440
 
443
441
  if (contentJSON.can_2 != undefined) {
444
- var transmitList1 = contentJSON.can_1.transmit;
445
- var transmitList2 = contentJSON.can_2.transmit;
446
- transmitList1Filtered = transmitList1.filter(function (e) {
447
- return e.period < e.delay;
448
- });
449
- transmitList2Filtered = transmitList2.filter(function (e) {
450
- return e.period < e.delay;
451
- });
452
- }
442
+ if (contentJSON.can_1.transmit != undefined) {
443
+ var transmitList1 = contentJSON.can_1.transmit;
444
+ var transmitList1Filtered = transmitList1.filter(function (e) {
445
+ return e.period < e.delay;
446
+ });
453
447
 
454
- console.log("transmitList1Filtered", transmitList1Filtered);
455
- console.log("transmitList2Filtered", transmitList2Filtered);
448
+ if (transmitList1Filtered.length > 0) {
449
+ dispatch(set({
450
+ type: "warning",
451
+ message: "Your CAN CH1 transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File.",
452
+ autoClear: false
453
+ }));
454
+ }
455
+ }
456
456
 
457
- if (transmitList1Filtered.length > 0) {
458
- dispatch(set({
459
- type: "warning",
460
- message: "Your CAN CH1 transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File.",
461
- autoClear: false
462
- }));
463
- }
457
+ if (contentJSON.can_2.transmit != undefined) {
458
+ var transmitList2 = contentJSON.can_2.transmit;
459
+ var transmitList2Filtered = transmitList2.filter(function (e) {
460
+ return e.period < e.delay;
461
+ });
464
462
 
465
- if (transmitList2Filtered.length > 0) {
466
- dispatch(set({
467
- type: "warning",
468
- message: "Your CAN CH2 transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File.",
469
- autoClear: false
470
- }));
463
+ if (transmitList2Filtered.length > 0) {
464
+ dispatch(set({
465
+ type: "warning",
466
+ message: "Your CAN CH2 transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File.",
467
+ autoClear: false
468
+ }));
469
+ }
470
+ }
471
471
  }
472
472
 
473
473
  dispatch(setConfigContent(content));