Skip to content

Commit

Permalink
Handle Firefox 51 plugin non-string description bug
Browse files Browse the repository at this point in the history
  • Loading branch information
syranide committed Mar 30, 2017
1 parent 33e2ea6 commit 9f87416
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swf-player-version",
"version": "1.1.3",
"version": "1.1.4",
"license": "MIT",
"description": "Shockwave Flash Player version utility",
"authors": ["Andreas Svensson <andreas@syranide.com>"],
Expand Down
2 changes: 1 addition & 1 deletion npm-swf-player-version/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swf-player-version",
"version": "1.1.3",
"version": "1.1.4",
"license": "MIT",
"description": "Shockwave Flash Player version utility",
"author": "Andreas Svensson <andreas@syranide.com>",
Expand Down
6 changes: 5 additions & 1 deletion npm-swf-player-version/swf-player-version.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/*! swf-player-version v1.1.3 | @syranide | MIT license */
/*! swf-player-version v1.1.4 | @syranide | MIT license */

'use strict';

var detectedVersion;

function parseVersion(description) {
if (typeof description !== 'string') {
return '0.0.0';
}

var match = description.match(/\d+/g);
if (match != null) {
return match.slice(0, 3).join('.');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swf-player-version",
"version": "1.1.3",
"version": "1.1.4",
"license": "MIT",
"description": "Shockwave Flash Player version utility",
"author": "Andreas Svensson <andreas@syranide.com>",
Expand Down
6 changes: 5 additions & 1 deletion swf-player-version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! swf-player-version v1.1.3 | @syranide | MIT license */
/*! swf-player-version v1.1.4 | @syranide | MIT license */

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
Expand All @@ -14,6 +14,10 @@
var detectedVersion;

function parseVersion(description) {
if (typeof description !== 'string') {
return '0.0.0';
}

var match = description.match(/\d+/g);
if (match != null) {
return match.slice(0, 3).join('.');
Expand Down
4 changes: 2 additions & 2 deletions swf-player-version.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f87416

Please sign in to comment.