8
0
Просмотр исходного кода

Fixed code style, simplified text trimming.

Maksymilian Barnaś 9 лет назад
Родитель
Сommit
b1c71f7540
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      dev/tasks/dev/utils/inquiries.js

+ 2 - 2
dev/tasks/dev/utils/inquiries.js

@@ -77,10 +77,10 @@ module.exports = {
 };
 
 function appendPeriodIfMissing( text ) {
-	text = text ? String.prototype.trim.call( text ) : '';
+	text = text ? text.trim() : '';
 	const length = text.length;
 
-	if ( length > 0 && text[length - 1] !== '.' ) {
+	if ( length > 0 && text[ length - 1 ] !== '.' ) {
 		text += '.';
 	}