1
0
Fork 0
forked from 0x2620/oxjs

fix a bug where menus would modify item objects passed by reference

This commit is contained in:
rlx 2011-09-19 06:33:52 +00:00
commit 636f772820
3 changed files with 6 additions and 11 deletions

View file

@ -36,7 +36,7 @@ Ox.MenuItem = function(options, self) {
position: 0,
title: [],
})
.options(Ox.extend(options, {
.options(Ox.extend(Ox.clone(options), {
keyboard: parseKeyboard(options.keyboard || self.defaults.keyboard),
title: Ox.toArray(options.title || self.defaults.title)
}))