質問編集履歴
3
存在しない数字を入れた場合のchrome developer tools上のエラー
title
CHANGED
File without changes
|
body
CHANGED
@@ -57,8 +57,29 @@
|
|
57
57
|
Symbol(Symbol.unscopables): {copyWithin: true, entries: true, fill: true, find: true, findIndex: true, …}
|
58
58
|
__proto__: Object
|
59
59
|
```
|
60
|
+
存在しない数字を入れた場合のchrome developer tools上のエラー
|
61
|
+
```
|
62
|
+
Uncaught TypeError: Cannot read property 'summary' of null
|
63
|
+
at buildHtml (books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:3)
|
64
|
+
at Object.<anonymous> (books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:19)
|
65
|
+
at fire (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3269)
|
66
|
+
at Object.fireWith [as resolveWith] (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3399)
|
67
|
+
at done (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9306)
|
68
|
+
at XMLHttpRequest.<anonymous> (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9549)
|
69
|
+
buildHtml @ books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:3
|
70
|
+
(anonymous) @ books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:19
|
71
|
+
fire @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3269
|
72
|
+
fireWith @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3399
|
73
|
+
done @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9306
|
74
|
+
(anonymous) @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9549
|
75
|
+
load (async)
|
76
|
+
send @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9568
|
77
|
+
ajax @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9207
|
78
|
+
(anonymous) @ books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:12
|
79
|
+
dispatch @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:5184
|
80
|
+
elemData.handle @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:4992
|
81
|
+
```
|
60
82
|
|
61
|
-
|
62
83
|
### 該当のソースコード
|
63
84
|
|
64
85
|
```book
|
2
エラーメッセージの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,6 +5,60 @@
|
|
5
5
|
### 発生している問題・エラーメッセージ
|
6
6
|
ソースコードのように記述していますが、nullを判定できず、条件分岐してくれません。
|
7
7
|
|
8
|
+
https://api.openbd.jp/v1/get?isbn=1241の様に適当な数字を入れ実行したところ、
|
9
|
+
ブラウザ上には[null]と表示されました。
|
10
|
+
|
11
|
+
chromeでの検証結果
|
12
|
+
```
|
13
|
+
[null]
|
14
|
+
0: null
|
15
|
+
length: 1
|
16
|
+
__proto__: Array(0)
|
17
|
+
concat: ƒ concat()
|
18
|
+
constructor: ƒ Array()
|
19
|
+
copyWithin: ƒ copyWithin()
|
20
|
+
entries: ƒ entries()
|
21
|
+
every: ƒ every()
|
22
|
+
fill: ƒ fill()
|
23
|
+
filter: ƒ filter()
|
24
|
+
find: ƒ find()
|
25
|
+
findIndex: ƒ findIndex()
|
26
|
+
flat: ƒ flat()
|
27
|
+
flatMap: ƒ flatMap()
|
28
|
+
forEach: ƒ forEach()
|
29
|
+
includes: ƒ includes()
|
30
|
+
indexOf: ƒ indexOf()
|
31
|
+
join: ƒ join()
|
32
|
+
keys: ƒ keys()
|
33
|
+
lastIndexOf: ƒ lastIndexOf()
|
34
|
+
length: 0
|
35
|
+
map: ƒ map()
|
36
|
+
pop: ƒ pop()
|
37
|
+
push: ƒ push()
|
38
|
+
reduce: ƒ reduce()
|
39
|
+
reduceRight: ƒ reduceRight()
|
40
|
+
arguments: (...)
|
41
|
+
caller: (...)
|
42
|
+
length: 1
|
43
|
+
name: "reduceRight"
|
44
|
+
__proto__: ƒ ()
|
45
|
+
[[Scopes]]: Scopes[0]
|
46
|
+
reverse: ƒ reverse()
|
47
|
+
shift: ƒ shift()
|
48
|
+
slice: ƒ slice()
|
49
|
+
some: ƒ some()
|
50
|
+
sort: ƒ sort()
|
51
|
+
splice: ƒ splice()
|
52
|
+
toLocaleString: ƒ toLocaleString()
|
53
|
+
toString: ƒ toString()
|
54
|
+
unshift: ƒ unshift()
|
55
|
+
values: ƒ values()
|
56
|
+
Symbol(Symbol.iterator): ƒ values()
|
57
|
+
Symbol(Symbol.unscopables): {copyWithin: true, entries: true, fill: true, find: true, findIndex: true, …}
|
58
|
+
__proto__: Object
|
59
|
+
```
|
60
|
+
|
61
|
+
|
8
62
|
### 該当のソースコード
|
9
63
|
|
10
64
|
```book
|
1
やってみたことの編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -48,4 +48,4 @@
|
|
48
48
|
|
49
49
|
### 試したこと
|
50
50
|
|
51
|
-
|
51
|
+
elseif文を追加し「data[0].summary.title == null」などにしても条件分岐してくれませんでした。
|