Skip to content

Commit d8f6ccd

Browse files
authored
Fix Unable to bridge NSNumber to Float (#236)
1 parent 3daafe8 commit d8f6ccd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.DS_Store
22
.dart_tool/
3-
3+
.idea/
44
.packages
55
.pub/
66

macos/Classes/WindowManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ public class WindowManager: NSObject, NSWindowDelegate {
235235
}
236236

237237
if (args["x"] != nil && args["y"] != nil) {
238-
frameRect.topLeft.x = CGFloat(args["x"] as! Float)
239-
frameRect.topLeft.y = CGFloat(args["y"] as! Float)
238+
frameRect.topLeft.x = CGFloat(truncating: args["x"] as! NSNumber)
239+
frameRect.topLeft.y = CGFloat(truncating: args["y"] as! NSNumber)
240240
}
241241

242242
if (animate) {

0 commit comments

Comments
 (0)