mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
iconGrid: Actually throw programmer errors
This way we get a backtrace.
This commit is contained in:
parent
af06b78605
commit
17421e8a63
1 changed files with 2 additions and 4 deletions
|
|
@ -423,10 +423,8 @@ const IconGrid = new Lang.Class({
|
|||
},
|
||||
|
||||
addItem: function(item, index) {
|
||||
if (!item.icon || !item.icon instanceof BaseIcon) {
|
||||
log('Only items with a BaseIcon icon property can be added to IconGrid');
|
||||
return;
|
||||
}
|
||||
if (!item.icon instanceof BaseIcon)
|
||||
throw new Error('Only items with a BaseIcon icon property can be added to IconGrid');
|
||||
|
||||
this._items.push(item);
|
||||
if (index !== undefined)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue