Skip to content

Commit

Permalink
v3.1.12
Browse files Browse the repository at this point in the history
bug fix:

-mistake with filling userAgent for node js cases
  • Loading branch information
ilya.veklenko committed Jun 14, 2016
1 parent 6048637 commit df84c44
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backendless",
"version": "3.1.11",
"version": "3.1.12",
"homepage": "https://github.com/Backendless/JS-SDK",
"authors": [
"Mark Piller <[email protected]>"
Expand Down
13 changes: 8 additions & 5 deletions libs/backendless.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Backendless.js 3.1.11
// Backendless.js 3.1.12

(function(factory) {
var root = (typeof self == 'object' && self.self === self && self) ||
Expand Down Expand Up @@ -36,7 +36,7 @@
emptyFn = (function() {
});

Backendless.VERSION = '3.1.11';
Backendless.VERSION = '3.1.12';
Backendless.serverURL = 'https://api.backendless.com';

Backendless.noConflict = function() {
Expand Down Expand Up @@ -76,10 +76,13 @@
initXHR();

var browser = (function() {
var userAgent = navigator.userAgent || "hybrid-app";
var ua = 'NodeJS';

var ua = isBrowser ? userAgent.toLowerCase() : "NodeJS",
match = (/(chrome)[ \/]([\w.]+)/.exec(ua) ||
if (isBrowser) {
ua = navigator.userAgent ? navigator.userAgent.toLowerCase() : 'hybrid-app';
}

var match = (/(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
Expand Down
4 changes: 2 additions & 2 deletions libs/backendless.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/backendless.min.map

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": "backendless",
"version": "3.1.11",
"version": "3.1.12",
"description": "Backendless JavaScript SDK for Node.js and the browser",
"main": "./libs/backendless.js",
"scripts": {
Expand Down

0 comments on commit df84c44

Please sign in to comment.