Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Unified Diff: src/js/harmony-string-padding.js

Issue 1926773003: [esnext] implement StringPad spec changes from March TC39 meeting (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/harmony-string-pad-end.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/harmony-string-padding.js
diff --git a/src/js/harmony-string-padding.js b/src/js/harmony-string-padding.js
index a6c6c474de5503e269b451b3fe89b1173e973453..dc59823fefbb8908a38b7f3f55401834abc38b54 100644
--- a/src/js/harmony-string-padding.js
+++ b/src/js/harmony-string-padding.js
@@ -30,7 +30,8 @@ function StringPad(thisString, maxLength, fillString) {
} else {
fillString = TO_STRING(fillString);
if (fillString === "") {
- fillString = " ";
+ // If filler is the empty String, return S.
+ return "";
}
}
« no previous file with comments | « no previous file | test/mjsunit/harmony/harmony-string-pad-end.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698