History: do not dereference a null model

Seems "null" objects in Javascript can either be null, or
be non null but with a type of 'undefined' (as a string).

Whatever.
This commit is contained in:
moneromooo.monero 2016-11-16 21:17:02 +00:00
parent 24a66c184d
commit d62dd3ee19

View file

@ -48,7 +48,7 @@ Rectangle {
color: "#F0EEEE" color: "#F0EEEE"
function getSelectedAmount() { function getSelectedAmount() {
if (typeof model === 'undefined') if (typeof model === 'undefined' || model == null)
return "" return ""
var total = 0 var total = 0
var count = model.rowCount() var count = model.rowCount()