feat: Longbow.common.js 增加 format 方法对 null 处理

This commit is contained in:
Argo Zhang (Win) 2019-08-09 13:19:13 +08:00
parent 07fe5a95d4
commit 455b5870e7
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 4 additions and 4 deletions

View File

@ -60,8 +60,8 @@
// 扩展format
$.extend({
"format": function (source, params) {
if (params === undefined) {
return source;
if (params === undefined || params === null) {
return null;
}
if (arguments.length > 2 && params.constructor !== Array) {
params = $.makeArray(arguments).slice(1);

View File

@ -60,8 +60,8 @@
// 扩展format
$.extend({
"format": function (source, params) {
if (params === undefined) {
return source;
if (params === undefined || params === null) {
return null;
}
if (arguments.length > 2 && params.constructor !== Array) {
params = $.makeArray(arguments).slice(1);