Use client default if server default printer profile in unavailable
This commit is contained in:
parent
d39c124f35
commit
e3d44d7d06
1 changed files with 10 additions and 2 deletions
|
|
@ -476,8 +476,16 @@ $(function() {
|
|||
});
|
||||
self.profiles.updateItems(items);
|
||||
self.defaultProfile(defaultProfile);
|
||||
self.currentProfile(currentProfile);
|
||||
self.currentProfileData(currentProfileData);
|
||||
|
||||
if (currentProfile && currentProfileData) {
|
||||
self.currentProfile(currentProfile);
|
||||
self.currentProfileData(currentProfileData);
|
||||
} else {
|
||||
// shouldn't normally happen, but just to not have anything else crash...
|
||||
log.warn("Current printer profile could not be detected, using default values");
|
||||
self.currentProfile("");
|
||||
self.currentProfileData(ko.mapping.fromJS(cleanProfile(), self.currentProfileData));
|
||||
}
|
||||
};
|
||||
|
||||
self.addProfile = function(callback) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue