Github user nikhilkh commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-vibration/pull/38#discussion_r38659458
  
    --- Diff: src/windows/VibrationProxy.js ---
    @@ -60,12 +61,43 @@ if (VibrationDevice) {
                     fail(e);
                 }
             }, 
    -        vibrateWithPattern: function(success, fail, args) {
    -            // TODO: Implement with setTimeout.
    -            fail('"vibrateWithPattern" is unsupported by this platform.');
    +        vibrateWithPattern: function (success, fail, args) {
    +            // Cancel current vibrations first
    +            module.exports.cancelVibration(function () {
    +                // Removes the first zero
    +                if (args[0] && args[0][0] === 0) {
    +                    args[0].shift(0);
    +                }
    +
    +                patternChainPromise = args[0].reduce(function 
(previousValue, currentValue, index) {
    --- End diff --
    
    Do we need to test for presence of args[0]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to