Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

[Windows] Added a check on activation context existence #1129

Merged
merged 1 commit into from
Aug 7, 2016

Conversation

tomasvarg
Copy link
Contributor

Description

Added a check on existence of the activation context when determining if the app was launched by a push notification as it was crashing when the context was not defined.

Related Issue

#1036

Motivation and Context

The activation context (cordova.require('cordova/platform').activationContext) is not guaranteed to exist, the block depending on it is not necessary for the core functionality to work so there's no reason to let it fail with Unable to get property 'args' of undefined or null reference error.

How Has This Been Tested?

Tested on physical devices (smartphones) with Windows 10 & WindowsPhone 8.1

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@markdegrootnl
Copy link

Please merge. If you -for instance- reload the html, the app crashes completely due to the context variable not existing.

@macdonst macdonst merged commit 151c8cd into phonegap:master Aug 7, 2016
@macdonst
Copy link
Member

macdonst commented Aug 7, 2016

@tomasvarg Thanks!

@lock
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants