mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Prevent exception when selecting not inserted segments.
This commit is contained in:
parent
9f448a97ef
commit
96c50abce2
1 changed files with 5 additions and 2 deletions
|
@ -593,8 +593,11 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
|||
}
|
||||
if ((selected = !!selected) ^ this._selected) {
|
||||
this._selected = selected;
|
||||
this._project._updateSelection(this);
|
||||
this._changed(/*#=*/Change.ATTRIBUTE);
|
||||
var project = this._project;
|
||||
if (project) {
|
||||
project._updateSelection(this);
|
||||
this._changed(/*#=*/Change.ATTRIBUTE);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue