fix(vibrateWithPattern): function doesn't update the pattern variable reference
This closes #45
diff --git a/www/vibration.js b/www/vibration.js
index 122c74d..d663dc7 100644
--- a/www/vibration.js
+++ b/www/vibration.js
@@ -53,7 +53,7 @@
vibrate: function(param) {
/* Aligning with w3c spec */
-
+
//vibrate
if ((typeof param == 'number') && param !== 0)
exec(null, null, "Vibration", "vibrate", [param]);
@@ -108,7 +108,7 @@
*/
vibrateWithPattern: function(pattern, repeat) {
repeat = (typeof repeat !== "undefined") ? repeat : -1;
- pattern.unshift(0); //add a 0 at beginning for backwards compatibility from w3c spec
+ var pattern = pattern.unshift(0); //add a 0 at beginning for backwards compatibility from w3c spec
exec(null, null, "Vibration", "vibrateWithPattern", [pattern, repeat]);
},