فهرست منبع

【APPCenter】Crash编号:130

liujiajie 6 ماه پیش
والد
کامیت
3fbd43c505

+ 8 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.swift

@@ -569,12 +569,14 @@ let KMPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
             dateFormatterString = dateStyleArray.last
         } else {
             let index = dateStyleArray.firstIndex(of: dateStyleIndicate)
-            if index! > dateStyleArray.count {
-                dateComboBox.selectItem(at: dateStyleArray.count - 1)
-                dateFormatterString = dateStyleArray.last
-            } else {
-                dateComboBox.selectItem(at: index!)
-                dateFormatterString = dateStyleIndicate
+            if index != nil{
+                if index ?? 0 > dateStyleArray.count {
+                    dateComboBox.selectItem(at: dateStyleArray.count - 1)
+                    dateFormatterString = dateStyleArray.last
+                } else {
+                    dateComboBox.selectItem(at: index ?? 0)
+                    dateFormatterString = dateStyleIndicate
+                }
             }
         }