From 7ab02c5b11b57fa7a4e96682088d09389dfc4ddb Mon Sep 17 00:00:00 2001 From: Vadim Date: Sat, 19 Sep 2015 20:06:07 -0400 Subject: [PATCH] fixing options --- CanvasTextWrapper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CanvasTextWrapper.js b/CanvasTextWrapper.js index 80a225b..95a5423 100644 --- a/CanvasTextWrapper.js +++ b/CanvasTextWrapper.js @@ -7,7 +7,7 @@ (function (root) { - function CanvasTextWrapper(canvas, text, opts) { + function CanvasTextWrapper(canvas, text, options) { 'use strict'; var defaults = { @@ -25,11 +25,11 @@ strokeText: false // text is stroked according to context configuration }; - opts = opts || {}; + var opts = {}; for (var property in defaults) { if (defaults.hasOwnProperty(property)) { - opts[property] = (opts && opts[property]) ? opts[property] : defaults[property]; + opts[property] = (options && options[property]) ? options[property] : defaults[property]; } }