feat: Longbow.common.js 增加 format 方法对 null 处理
This commit is contained in:
parent
07fe5a95d4
commit
455b5870e7
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue