유명현

FIX: bunjang null exception

...@@ -7,19 +7,22 @@ const marketMultiSearch = (keyword) => { ...@@ -7,19 +7,22 @@ const marketMultiSearch = (keyword) => {
7 const result = []; 7 const result = [];
8 return new Promise((resolve, reject) => { 8 return new Promise((resolve, reject) => {
9 daangnMultiSearch(keyword).then((res) => { 9 daangnMultiSearch(keyword).then((res) => {
10 - if (res !== undefined) { 10 + console.log(`daangn: ${res}`);
11 + if (res !== undefined && res !== null) {
11 for (let i = 0; i < res.length && i < 4; i++) { 12 for (let i = 0; i < res.length && i < 4; i++) {
12 result.push(res[i]); 13 result.push(res[i]);
13 } 14 }
14 } 15 }
15 bunjangMultiSearch(keyword).then((res) => { 16 bunjangMultiSearch(keyword).then((res) => {
16 - if (res !== undefined) { 17 + console.log(`bunjang: ${res}`);
18 + if (res !== undefined && res !== null) {
17 for (let i = 0; i < res.length && i < 4; i++) { 19 for (let i = 0; i < res.length && i < 4; i++) {
18 result.push(res[i]); 20 result.push(res[i]);
19 } 21 }
20 } 22 }
21 joongnaMultiSearch(keyword).then((res) => { 23 joongnaMultiSearch(keyword).then((res) => {
22 - if (res !== undefined) { 24 + console.log(`joongna: ${res}`);
25 + if (res !== undefined && res !== null) {
23 for (let i = 0; i < res.length && i < 4; i++) { 26 for (let i = 0; i < res.length && i < 4; i++) {
24 result.push(res[i]); 27 result.push(res[i]);
25 } 28 }
......