From 8e62d47c7210854b570db5e9164a6a9da6351c12 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 수, 09 2월 2022 17:59:06 +0900
Subject: [PATCH] - 이슈 추가,수정 시 파트너 정보 null 체크 추가

---
 src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js b/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js
index 6b9b468..46f940a 100644
--- a/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js
+++ b/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js
@@ -140,24 +140,24 @@
                 }
 
                 $scope.$on("ispFieldEvent", function (event, result) {
-                    if ($rootScope.isDefined(result[0])) {
+                    if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) {
                         $scope.vm.form.ispId = result[0].id;
                     }
                 });
 
                 $scope.$on("hostingFieldEvent", function (event, result) {
-                    if ($rootScope.isDefined(result[0])) {
+                    if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) {
                         $scope.vm.form.hostingId = result[0].id;
                     }
                 });
 
                 $scope.$on("companyTypeEvent", function (event, result) {
-                    if ($rootScope.isDefined(result[0])) {
+                    if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) {
                         $scope.vm.form.companyTypeId = result[0].id;
                     }
                 });
                 $scope.$on("parentSectorEvent", function (event, result) {
-                    if ($rootScope.isDefined(result[0])) {
+                    if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) {
                         $scope.vm.form.parentSectorId = result[0].id;
                     }
                     $scope.vm.form.childSectorId = "";
@@ -165,17 +165,17 @@
                     $scope.vm.form.childSectors = [];
                 });
                 $scope.$on("childSectorEvent", function (event, result) {
-                    if ($rootScope.isDefined(result[0])) {
+                    if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) {
                         $scope.vm.form.childSectorId = result[0].id;
                     }
                 });
                 $scope.$on("regionEvent", function (event, result) {
-                    if ($rootScope.isDefined(result[0])) {
+                    if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) {
                         $scope.vm.form.regionId = result[0].id;
                     }
                 });
                 $scope.$on("statusEvent", function (event, result) {
-                    if ($rootScope.isDefined(result[0])) {
+                    if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) {
                         $scope.vm.form.statusId = result[0].id;
                     }
                 });

--
Gitblit v1.8.0