Skip to content

Commit 9092008

Browse files
committed
Merge pull request #99 from teamsnap/fix-template-type
Ensure type is being properly converted for comparison
2 parents e7768d8 + 2c1c35f commit 9092008

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

lib/teamsnap.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4047,6 +4047,9 @@ modifyModel = function() {
40474047
var isSame, oldValue, value;
40484048
oldValue = state[camelize(field.name)];
40494049
value = field.value;
4050+
if (field.name === 'type') {
4051+
value = camelize(value);
4052+
}
40504053
isSame = value === oldValue || (value && oldValue && value.valueOf() === oldValue.valueOf());
40514054
return !isSame;
40524055
});
@@ -5652,7 +5655,7 @@ ref = require('./model'), Collection = ref.Collection, Item = ref.Item;
56525655
require('./errors');
56535656

56545657
TeamSnap = (function() {
5655-
TeamSnap.prototype.version = '1.7.0-pre22';
5658+
TeamSnap.prototype.version = '1.7.0-pre23';
56565659

56575660
TeamSnap.prototype.promises = promises;
56585661

lib/teamsnap.min.js

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "teamsnap.js",
3-
"version": "1.7.0-pre22",
3+
"version": "1.7.0-pre23",
44
"description": "A JavaScript library for using the TeamSnap API.",
55
"author": "Jacob Wright with TeamSnap (http://www.teamsnap.com)",
66
"homepage": "https://github.com/teamsnap/teamsnap-javascript-sdk",

src/persistence.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ modifyModel = ->
122122
body.template.data = body.template.data.filter (field) ->
123123
oldValue = state[camelize field.name]
124124
value = field.value
125+
if field.name is 'type'
126+
value = camelize(value)
125127
isSame =
126128
value is oldValue or
127129
(value and oldValue and value.valueOf() is oldValue.valueOf())

src/teamsnap.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ promises = require './promises'
33
require './errors'
44

55
class TeamSnap
6-
version: '1.7.0-pre22'
6+
version: '1.7.0-pre23'
77
promises: promises
88
when: promises.when
99
TeamSnap: TeamSnap

0 commit comments

Comments
 (0)