This commit is contained in:
yumoqing 2024-05-16 21:50:07 +08:00
parent 57752b8433
commit 6634559657
2 changed files with 4 additions and 1 deletions

View File

@ -96,7 +96,7 @@ bricks.str2data = function(s, d){
return s;
}
bricks.apply_data = function(desc, data){
if (Object.keys(data).length == 0){
if (bricks.is_empty(data)){
return desc;
}
var tmpl = JSON.stringify(desc);

View File

@ -1,5 +1,8 @@
var bricks = window.bricks || {};
bricks.bug = false;
bricks.is_empty = function(obj){
return JSON.stringify(obj) === '{}';
}
bricks.debug = function(...args){
if (! bricks.bug){
return;