Repository: auth0/auth0.js
Pull request #326 (2017-01-20 09:38:43)

Fix error in example.
`window.location.hash` was typoed to `window.localtion`.

codecov-io: ## [Current coverage](https://codecov.io/gh/auth0/auth0.js/pull/326?src=pr) is 98.82% (diff: 100%)
> Merging [#326](https://codecov.io/gh/auth0/auth0.js/pull/326?src=pr) into [master](https://codecov.io/gh/auth0/auth0.js/branch/master?src=pr) will not change coverage

```diff
@@             master       #326   diff @@
==========================================
  Files            30         30          
  Lines          1023       1023          
  Methods         171        171          
  Messages          0          0          
  Branches        167        167          
==========================================
  Hits           1011       1011          
  Misses           12         12          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [5f97950...eff17a0](https://codecov.io/gh/auth0/auth0.js/compare/5f979505418f6e01cd7a1c3850981c6e80e51950...eff17a09f1651fc9507b864ac2f716cded1725f9?src=pr)

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cce31e1..dfd0f1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
 #Change Log
 
+## [v8.1.3](https://github.com/auth0/auth0.js/tree/v8.1.3) (2017-01-23)
+[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.1.2...v8.1.3)
+
+**Fixed**
+- Fix case convertion of null values [\#329](https://github.com/auth0/auth0.js/pull/329) ([glena](https://github.com/glena))
+
+
 ## [v8.1.2](https://github.com/auth0/auth0.js/tree/v8.1.2) (2017-01-19)
 [Full Changelog](https://github.com/auth0/auth0.js/compare/v8.1.1...v8.1.2)
 
diff --git a/README.md b/README.md
index b31591f..d4d1286 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ From CDN
 
 ```html
 <!-- Latest patch release (recommended for production) -->
-<script src="http://cdn.auth0.com/js/auth0/8.1.2/auth0.min.js"></script>
+<script src="http://cdn.auth0.com/js/auth0/8.1.3/auth0.min.js"></script>
 ```
 
 From [bower](http://bower.io)
@@ -135,7 +135,7 @@ For example:
         domain: '{YOUR_AUTH0_DOMAIN}',
         clientID: '{YOUR_AUTH0_CLIENT_ID}'
       });
-      auth0.parseHash(window.localtion.hash, function (err, result) {
+      auth0.parseHash(window.location.hash, function (err, result) {
         parent.postMessage(err || result, 'https://example.com/');
       });
     </script>
diff --git a/package.json b/package.json
index 77008c3..55763d8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "auth0-js",
-  "version": "8.1.2",
+  "version": "8.1.3",
   "description": "Auth0 headless browser sdk",
   "main": "src/index.js",
   "keywords": [
diff --git a/src/helper/iframe-handler.js b/src/helper/iframe-handler.js
index 7635b33..2699872 100644
--- a/src/helper/iframe-handler.js
+++ b/src/helper/iframe-handler.js
@@ -66,7 +66,7 @@ IframeHandler.prototype.loadEventListener = function () {
 IframeHandler.prototype.callbackHandler = function (result) {
   var error = null;
 
-  if (result.error) {
+  if (result && result.error) {
     error = result;
     result = null;
   }
diff --git a/src/helper/object.js b/src/helper/object.js
index bc6cb97..6a5520d 100644
--- a/src/helper/object.js
+++ b/src/helper/object.js
@@ -88,10 +88,9 @@ function snakeToCamel(str) {
 }
 
 function toSnakeCase(object, exceptions) {
-  if (typeof object !== 'object' || assert.isArray(object) || !object === null) {
+  if (typeof object !== 'object' || assert.isArray(object) || object === null) {
     return object;
   }
-
   exceptions = exceptions || [];
 
   return Object.keys(object).reduce(function (p, key) {
@@ -102,7 +101,7 @@ function toSnakeCase(object, exceptions) {
 }
 
 function toCamelCase(object, exceptions) {
-  if (typeof object !== 'object' || assert.isArray(object) || !object === null) {
+  if (typeof object !== 'object' || assert.isArray(object) || object === null) {
     return object;
   }
 
diff --git a/src/version.js b/src/version.js
index 321d5d8..b169a44 100644
--- a/src/version.js
+++ b/src/version.js
@@ -1,2 +1,1 @@
-module.exports = { raw: '8.1.2' };
-
+module.exports = { raw: '8.1.3' };


Test patch:
diff --git a/test/helper/object.test.js b/test/helper/object.test.js
index 794d3cf..0f3ab39 100644
--- a/test/helper/object.test.js
+++ b/test/helper/object.test.js
@@ -371,6 +371,7 @@ describe('helpers', function () {
         attrName1: 'attribute_1',
         attrName22: 'attribute_2',
         attrNAME3: 'attribute_3',
+        attrNULL: null,
         arrayAtt: [ 'one', 'two' ],
         someObj: {
           objAtt1: 'asd',
@@ -385,6 +386,7 @@ describe('helpers', function () {
         attrName1: 'attribute_1',
         attrName22: 'attribute_2',
         attrNAME3: 'attribute_3',
+        attrNULL: null,
         arrayAtt: [ 'one', 'two' ],
         someObj: {
           objAtt1: 'asd',
@@ -400,6 +402,7 @@ describe('helpers', function () {
         attr_name_1: 'attribute_1',
         attr_name_22: 'attribute_2',
         attr_name_3: 'attribute_3',
+        attr_null: null,
         array_att: [ 'one', 'two' ],
         some_obj: {
           obj_att_1: 'asd',
@@ -439,6 +442,7 @@ describe('helpers', function () {
         attr_name_1: 'attribute_1',
         attr_name_22: 'attribute_2',
         attr__name_3: 'attribute_3',
+        attr_null: null,
         arr_att: [ "one", "two" ],
         some_obj: {
           obj_att_1: 'asdf',
@@ -453,6 +457,7 @@ describe('helpers', function () {
         attr_name_1: 'attribute_1',
         attr_name_22: 'attribute_2',
         attr__name_3: 'attribute_3',
+        attr_null: null,
         arr_att: [ "one", "two" ],
         some_obj: {
           obj_att_1: 'asdf',
@@ -468,6 +473,7 @@ describe('helpers', function () {
         attrName1: 'attribute_1',
         attrName22: 'attribute_2',
         attrName3: 'attribute_3',
+        attrNull: null,
         arrAtt: [ "one", "two" ],
         someObj: {
           objAtt1: 'asdf',