As you can read here, append()
expects Type: htmlString or Element or Array or jQuery
I think you should build your content (empty or div) and then append it like this:
//--- check if mode == 'list' on the outside
var myContent = (mode == 'list') ? $('<div>').addClass('product-description').html(product.description).appendTo(productObject) : "";
$('<div>').addClass('item-meta-container').append(
$('<div>').addClass('ratings').append(
$('<div>').addClass('ratings-result').css('width',+productScore+'px')
)
).append(myContent) //--- Here's your content!
.appendTo(object);
Have a look HERE for a simplified example.