diff --git a/js/transaction.js b/js/transaction.js
index 7de5e9a..9fcdde1 100644
--- a/js/transaction.js
+++ b/js/transaction.js
@@ -455,7 +455,8 @@ $(function() {
var sold_to = $("[name='sold_to']").val();
if (sold_to == "no_selection") {
$.post("json/transaction.php",{ not_logged_in: 1, transaction_id: $transaction_id }, function(data) {
- if (data) {
+ var obj = $.parseJSON(data);
+ if (obj.sold_to) {
var obj = $.parseJSON(data);
$("[name='sold_to']").replaceWith("" + obj.full_name +
"");