Mercurial > repos > public > sbplib
diff copyWithDefault.m @ 304:499653b553b8 feature/beams
copyWithDefault: fixed bug.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 12 Sep 2016 14:08:06 +0200 |
parents | 46256fffa329 |
children |
line wrap: on
line diff
--- a/copyWithDefault.m Fri Sep 09 13:11:25 2016 +0200 +++ b/copyWithDefault.m Mon Sep 12 14:08:06 2016 +0200 @@ -8,7 +8,8 @@ end % src has a value and is not a struct => use src - if ~isstruct(src) + % src has a value and default is not a struct => use src + if ~isstruct(src) || ~isstruct(default) dest = src; return end