Skip to content

Commit

Permalink
Version 1.2.2
Browse files Browse the repository at this point in the history
hot fix jquery as opposed to jQuery in node
  • Loading branch information
ArndBrugman committed Apr 2, 2017
1 parent 2888dcf commit c8b1e8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions huepi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
var huepi = function() {
/** @member {string} - version of the huepi interface */
this.version = '1.2.1';
this.version = '1.2.2';

/** @member {array} - Array of all Bridges on the local network */
this.LocalBridges = [];
Expand Down Expand Up @@ -70,7 +70,7 @@ var huepi = function() {
// Detect Running in NodeJS; module exisists and module.exports exists
// and type of global.process = object process
//
// requires domino window to create jQuery with window attached.
// requires domino window to create jquery with window attached.
//
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')
{
Expand All @@ -79,7 +79,7 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')

if (typeof global !== 'undefined' && typeof global.process !== 'undefined' &&
Object.prototype.toString.call(global.process) === '[object process]') {
$ = require('jQuery')(require('domino').createWindow('<html>huepi</html>'));
$ = require('jquery')(require('domino').createWindow('<html>huepi</html>'));
XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
$.support.cors = true; // cross domain, Cross-origin resource sharing
$.ajaxSettings.xhr = function() {
Expand All @@ -88,7 +88,7 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')
}
module.exports = huepi;
} else if (typeof define === 'function' && define.amd) {
$ = require('jQuery')(require('domino').createWindow('<html>huepi</html>'));
$ = require('jquery')(require('domino').createWindow('<html>huepi</html>'));
XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
$.support.cors = true; // cross domain, Cross-origin resource sharing
$.ajaxSettings.xhr = function() {
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": "huepi",
"version": "1.2.1",
"version": "1.2.2",
"description": "hue (Philips Wireless Lighting) Api interface for JavaScript",
"main": "huepi.js",
"scripts": {
Expand Down

0 comments on commit c8b1e8b

Please sign in to comment.