File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 119119 options = options || { }
120120 // eslint-disable-next-line no-param-reassign
121121 data = data || { }
122- var canvas = document . createElement ( 'canvas' )
123122 var useCanvas =
124- img . getContext || ( loadImage . requiresCanvas ( options ) && canvas . getContext )
123+ img . getContext ||
124+ ( loadImage . requiresCanvas ( options ) && ! ! window . HTMLCanvasElement )
125125 var width = img . naturalWidth || img . width
126126 var height = img . naturalHeight || img . height
127127 var destWidth = width
137137 var pixelRatio
138138 var downsamplingRatio
139139 var tmp
140+ var canvas
140141 /**
141142 * Scales up image dimensions
142143 */
254255 options
255256 )
256257 }
258+ canvas = document . createElement ( 'canvas' )
257259 downsamplingRatio = options . downsamplingRatio
258260 if (
259261 downsamplingRatio > 0 &&
You can’t perform that action at this time.
0 commit comments