mirror of
https://github.com/lrsjng/jquery-qrcode.git
synced 2026-08-12 20:01:55 +08:00
Fixes missings default values in some cases.
This commit is contained in:
@@ -149,9 +149,7 @@
|
|||||||
return $div;
|
return $div;
|
||||||
},
|
},
|
||||||
|
|
||||||
createHTML = function (options) {
|
createHTML = function (settings) {
|
||||||
|
|
||||||
var settings = $.extend({}, defaults, options);
|
|
||||||
|
|
||||||
return canvasAvailable && settings.render === 'canvas' ? createCanvas(settings) : createDiv(settings);
|
return canvasAvailable && settings.render === 'canvas' ? createCanvas(settings) : createDiv(settings);
|
||||||
},
|
},
|
||||||
@@ -188,12 +186,14 @@
|
|||||||
// -------------------
|
// -------------------
|
||||||
$.fn.qrcode = function(options) {
|
$.fn.qrcode = function(options) {
|
||||||
|
|
||||||
|
var settings = $.extend({}, defaults, options);
|
||||||
|
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
|
|
||||||
if (this.nodeName.toLowerCase() === 'canvas') {
|
if (this.nodeName.toLowerCase() === 'canvas') {
|
||||||
drawOnCanvas(this, options);
|
drawOnCanvas(this, settings);
|
||||||
} else {
|
} else {
|
||||||
$(this).append(createHTML(options));
|
$(this).append(createHTML(settings));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user