Skip to content

Commit 99c7025

Browse files
authored
Merge pull request #3304 from pandamicro/develop
Fix Widget.CanvasRenderCmd undefined issue
2 parents d3f4674 + d88eeff commit 99c7025

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: extensions/ccui/layouts/UILayoutCanvasRenderCmd.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
proto.constructor = ccui.Layout.CanvasRenderCmd;
4141

4242
cc.game.addEventListener(cc.game.EVENT_RENDERER_INITED, function () {
43-
ccui.Layout.CanvasRenderCmd.prototype.widgetVisit = ccui.Widget.CanvasRenderCmd.prototype.widgetVisit;
43+
if (ccui.Widget.CanvasRenderCmd) {
44+
ccui.Layout.CanvasRenderCmd.prototype.widgetVisit = ccui.Widget.CanvasRenderCmd.prototype.widgetVisit;
45+
}
4446
});
4547

4648
proto.visit = function(parentCmd){

0 commit comments

Comments
 (0)