mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-25 13:43:44 +00:00
Fix _initGradient with non-empty non-gradient values.
This commit is contained in:
parent
189b0efd34
commit
0bbaddf859
4 changed files with 3 additions and 3 deletions
2
dist/all.js
vendored
2
dist/all.js
vendored
|
|
@ -7601,7 +7601,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
|
|||
* @method initGradient
|
||||
*/
|
||||
_initGradient: function(options) {
|
||||
if (options.fill && !(options.fill instanceof fabric.Gradient)) {
|
||||
if (options.fill && typeof options.fill == 'object' && !(options.fill instanceof fabric.Gradient)) {
|
||||
this.set('fill', new fabric.Gradient(options.fill));
|
||||
}
|
||||
},
|
||||
|
|
|
|||
2
dist/all.min.js
vendored
2
dist/all.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/all.min.js.gz
vendored
BIN
dist/all.min.js.gz
vendored
Binary file not shown.
|
|
@ -146,7 +146,7 @@
|
|||
* @method initGradient
|
||||
*/
|
||||
_initGradient: function(options) {
|
||||
if (options.fill && !(options.fill instanceof fabric.Gradient)) {
|
||||
if (options.fill && typeof options.fill == 'object' && !(options.fill instanceof fabric.Gradient)) {
|
||||
this.set('fill', new fabric.Gradient(options.fill));
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue