If the interior_id
gets added to your viewmodel later then you can use the deferEvaluation
option on your ko.computed
so it only evaluates its function when the background
property gets accessed and not when your ViewModel
is created:
self.interior.background = ko.computed(function() {
//do stuff
}, this, {deferEvaluation: true});