Skip to content

Commit f2b7136

Browse files
committed
Merge pull request #45 from sirap-group/master
Fix #44: TypeError: Cannot read property 'length' of null
2 parents 431ba8e + 5defa0d commit f2b7136

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

angularjs-color-picker.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angularjs-color-picker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* angularjs-color-picker v0.7.1
2+
* angularjs-color-picker v0.7.2
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2015 ruhley
66
*
7-
* 2015-12-14 08:26:03
7+
* 2015-12-18 09:39:34
88
*
99
*/
1010
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
@@ -210,7 +210,7 @@ if (typeof module !== "undefined" && typeof exports !== "undefined" && module.ex
210210
};
211211

212212
$scope.$watch('ngModel', function (newValue, oldValue) {
213-
if (typeof newValue === 'string' && newValue !== oldValue && newValue.length > 4) {
213+
if (newValue !== undefined && newValue !== null && newValue !== oldValue && newValue.length > 4) {
214214
$scope.log('Color Picker: MODEL - CHANGED', newValue);
215215
var color = tinycolor(newValue);
216216

angularjs-color-picker.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angularjs-color-picker.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angularjs-color-picker.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-color-picker",
33
"description": "Color Picker Directive For AngularJS",
4-
"version": "0.7.1",
4+
"version": "0.7.2",
55
"homepage": "https://github.com/ruhley/angular-color-picker",
66
"repository": {
77
"type": "git",

lib/scripts/directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
};
192192

193193
$scope.$watch('ngModel', function (newValue, oldValue) {
194-
if (typeof newValue === 'string' && newValue !== oldValue && newValue.length > 4) {
194+
if (newValue !== undefined && newValue !== null && newValue !== oldValue && newValue.length > 4) {
195195
$scope.log('Color Picker: MODEL - CHANGED', newValue);
196196
var color = tinycolor(newValue);
197197

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angularjs-color-picker",
33
"description": "Color Picker Directive For AngularJS",
4-
"version": "0.7.1",
4+
"version": "0.7.2",
55
"main": "angularjs-color-picker.js",
66
"dependencies": {},
77
"repository": {

0 commit comments

Comments
 (0)