質問編集履歴
3
存在しない数字を入れた場合のchrome developer tools上のエラー
test
CHANGED
File without changes
|
test
CHANGED
@@ -116,7 +116,49 @@
|
|
116
116
|
|
117
117
|
```
|
118
118
|
|
119
|
-
|
119
|
+
存在しない数字を入れた場合のchrome developer tools上のエラー
|
120
|
+
|
121
|
+
```
|
122
|
+
|
123
|
+
Uncaught TypeError: Cannot read property 'summary' of null
|
124
|
+
|
125
|
+
at buildHtml (books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:3)
|
126
|
+
|
127
|
+
at Object.<anonymous> (books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:19)
|
128
|
+
|
129
|
+
at fire (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3269)
|
130
|
+
|
131
|
+
at Object.fireWith [as resolveWith] (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3399)
|
132
|
+
|
133
|
+
at done (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9306)
|
134
|
+
|
135
|
+
at XMLHttpRequest.<anonymous> (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9549)
|
136
|
+
|
137
|
+
buildHtml @ books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:3
|
138
|
+
|
139
|
+
(anonymous) @ books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:19
|
140
|
+
|
141
|
+
fire @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3269
|
142
|
+
|
143
|
+
fireWith @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:3399
|
144
|
+
|
145
|
+
done @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9306
|
146
|
+
|
147
|
+
(anonymous) @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9549
|
148
|
+
|
149
|
+
load (async)
|
150
|
+
|
151
|
+
send @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9568
|
152
|
+
|
153
|
+
ajax @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:9207
|
154
|
+
|
155
|
+
(anonymous) @ books.self-cf274625d10f3ce57f6688d7617e8fe8605e8ef10ac2ff3e48f64e8444310545.js?body=1:12
|
156
|
+
|
157
|
+
dispatch @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:5184
|
158
|
+
|
159
|
+
elemData.handle @ jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:4992
|
160
|
+
|
161
|
+
```
|
120
162
|
|
121
163
|
|
122
164
|
|
2
エラーメッセージの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,6 +12,114 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
+
https://api.openbd.jp/v1/get?isbn=1241の様に適当な数字を入れ実行したところ、
|
16
|
+
|
17
|
+
ブラウザ上には[null]と表示されました。
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
chromeでの検証結果
|
22
|
+
|
23
|
+
```
|
24
|
+
|
25
|
+
[null]
|
26
|
+
|
27
|
+
0: null
|
28
|
+
|
29
|
+
length: 1
|
30
|
+
|
31
|
+
__proto__: Array(0)
|
32
|
+
|
33
|
+
concat: ƒ concat()
|
34
|
+
|
35
|
+
constructor: ƒ Array()
|
36
|
+
|
37
|
+
copyWithin: ƒ copyWithin()
|
38
|
+
|
39
|
+
entries: ƒ entries()
|
40
|
+
|
41
|
+
every: ƒ every()
|
42
|
+
|
43
|
+
fill: ƒ fill()
|
44
|
+
|
45
|
+
filter: ƒ filter()
|
46
|
+
|
47
|
+
find: ƒ find()
|
48
|
+
|
49
|
+
findIndex: ƒ findIndex()
|
50
|
+
|
51
|
+
flat: ƒ flat()
|
52
|
+
|
53
|
+
flatMap: ƒ flatMap()
|
54
|
+
|
55
|
+
forEach: ƒ forEach()
|
56
|
+
|
57
|
+
includes: ƒ includes()
|
58
|
+
|
59
|
+
indexOf: ƒ indexOf()
|
60
|
+
|
61
|
+
join: ƒ join()
|
62
|
+
|
63
|
+
keys: ƒ keys()
|
64
|
+
|
65
|
+
lastIndexOf: ƒ lastIndexOf()
|
66
|
+
|
67
|
+
length: 0
|
68
|
+
|
69
|
+
map: ƒ map()
|
70
|
+
|
71
|
+
pop: ƒ pop()
|
72
|
+
|
73
|
+
push: ƒ push()
|
74
|
+
|
75
|
+
reduce: ƒ reduce()
|
76
|
+
|
77
|
+
reduceRight: ƒ reduceRight()
|
78
|
+
|
79
|
+
arguments: (...)
|
80
|
+
|
81
|
+
caller: (...)
|
82
|
+
|
83
|
+
length: 1
|
84
|
+
|
85
|
+
name: "reduceRight"
|
86
|
+
|
87
|
+
__proto__: ƒ ()
|
88
|
+
|
89
|
+
[[Scopes]]: Scopes[0]
|
90
|
+
|
91
|
+
reverse: ƒ reverse()
|
92
|
+
|
93
|
+
shift: ƒ shift()
|
94
|
+
|
95
|
+
slice: ƒ slice()
|
96
|
+
|
97
|
+
some: ƒ some()
|
98
|
+
|
99
|
+
sort: ƒ sort()
|
100
|
+
|
101
|
+
splice: ƒ splice()
|
102
|
+
|
103
|
+
toLocaleString: ƒ toLocaleString()
|
104
|
+
|
105
|
+
toString: ƒ toString()
|
106
|
+
|
107
|
+
unshift: ƒ unshift()
|
108
|
+
|
109
|
+
values: ƒ values()
|
110
|
+
|
111
|
+
Symbol(Symbol.iterator): ƒ values()
|
112
|
+
|
113
|
+
Symbol(Symbol.unscopables): {copyWithin: true, entries: true, fill: true, find: true, findIndex: true, …}
|
114
|
+
|
115
|
+
__proto__: Object
|
116
|
+
|
117
|
+
```
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
15
123
|
### 該当のソースコード
|
16
124
|
|
17
125
|
|
1
やってみたことの編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -98,4 +98,4 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
|
101
|
-
if文を「data[0].summary.title
|
101
|
+
elseif文を追加し「data[0].summary.title == null」などにしても条件分岐してくれませんでした。
|