Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ac39b06

Browse files
authored
Merge pull request #956 from rezyx/replace-strings-11/async/02-promise-basics
Replace error strings with template strings
2 parents feebafc + b457de1 commit ac39b06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎1-js/11-async/02-promise-basics/article.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function loadScript(src, callback) {
290290
script.src = src;
291291

292292
script.onload = () => callback(null, script);
293-
script.onerror = () => callback(new Error(`Script load error `+src));
293+
script.onerror = () => callback(new Error(`Script load error for ${src}`));
294294

295295
document.head.append(script);
296296
}
@@ -307,7 +307,7 @@ function loadScript(src) {
307307
script.src = src;
308308

309309
script.onload = () => resolve(script);
310-
script.onerror = () => reject(new Error("Script load error: "+src));
310+
script.onerror = () => reject(new Error(`Script load error for ${src}`));
311311

312312
document.head.append(script);
313313
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /