jamf / JamfMigrator

A tool to migrate data granularly between Jamf Pro servers
MIT License
140 stars 10 forks source link

Update ViewController.swift #52

Closed red5coder closed 4 years ago

red5coder commented 4 years ago

Line 2744 is forcefully unwrapping the value from the dictionary (xmlPrefOptions). We are seeing crashes where the key (saveRawXmlScope) does not exist. Ideally should check if a value is returned before unwrapping. Here I have used the Nil Coalescing Operator to supply a default value of false if the key is not found. You could have used an if/let statement as well.

BIG-RAT commented 4 years ago

manually updated and resolved conflict.