Skip to content

Commit df48420

Browse files
committed
Refactor #3985: Fix bug when margin not set in ccs.Margin
1 parent 5fd806a commit df48420

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/CocoStudio/GUI/Layouts/UILayoutDefine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ccs.Margin = ccs.Class.extend(/** @lends ccs.Margin# */{
7676
right: 0,
7777
bottom: 0,
7878
ctor: function (margin, top, right, bottom) {
79-
if (top === undefined) {
79+
if (margin && top === undefined) {
8080
this.left = margin.left;
8181
this.top = margin.top;
8282
this.right = margin.right;

0 commit comments

Comments
 (0)