Skip to content

Commit

Permalink
Release 2.4.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Szwacz committed Aug 17, 2016
1 parent 37725fa commit 33e042a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filepicker-js-bower",
"version": "2.4.16",
"version": "2.4.17",
"homepage": "https://github.com/krystiangw/filepicker-js-bower",
"description": "Filepicker javascript client library",
"main": "filepicker.min.js",
Expand Down
12 changes: 8 additions & 4 deletions filepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ filepicker.extend("comm", function() {
if (event.origin !== fp.urls.BASE && event.origin !== fp.urls.DIALOG_BASE) {
return;
}
var data = fp.json.parse(event.data);
fp.handlers.run(data);
try {
var data = fp.json.parse(event.data);
fp.handlers.run(data);
} catch (err) {
console.log("[Filepicker] Failed processing message:", event.data);
}
};
var isOpen = false;
var openCommunicationsChannel = function() {
Expand Down Expand Up @@ -1030,7 +1034,7 @@ filepicker.extend("errors", function() {
"use strict";

filepicker.extend(function() {
var fp = this, VERSION = "2.4.16";
var fp = this, VERSION = "2.4.17";
fp.API_VERSION = "v2";
var setKey = function(key) {
fp.apikey = key;
Expand Down Expand Up @@ -2867,7 +2871,7 @@ filepicker.extend("util", function() {
};
var getFPUrl = function(url) {
if (typeof url === "string") {
var matched = url.match(/(?:cdn.filestackcontent.com|cdn.filepicker.io)[\S]*\/([\S]{20,})/);
var matched = url.match(/(?:^https?:\/\/cdn.filestackcontent.com|^https?:\/\/cdn.filepicker.io)[\S]*\/([\S]{20,})/);
if (matched && matched.length > 1) {
return fp.urls.BASE + "/api/file/" + matched[1];
}
Expand Down
4 changes: 2 additions & 2 deletions filepicker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filepicker-js-bower",
"version": "2.4.16",
"version": "2.4.17",
"description": "Bower-friendly version of filepicker-js.",
"main": "filepicker.min.js",
"scripts": {
Expand Down

0 comments on commit 33e042a

Please sign in to comment.