diff --git a/README.md b/README.md index d57d4005..80b0fa33 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ Wax includes two libraries in `/lib` which are included in builds ## Changelog +#### 1.0.2 + +* Bug fixes for Firefox 3 + #### 1.0.1 * `make ext` added for downloading and installing external libraries needed to use examples. diff --git a/build/wax.g.js b/build/wax.g.js index e591726f..e41d5190 100644 --- a/build/wax.g.js +++ b/build/wax.g.js @@ -310,7 +310,7 @@ wax.Record = function(obj, context) { args = args.length ? wax.Record(args) : []; // real browsers - if (!$.browser.msie) { + if (Object.create) { obj = Object.create(fn_obj[1].prototype); fn_obj[1].apply(obj, args); // lord have mercy on your soul. @@ -395,19 +395,15 @@ wax.Record = function(obj, context) { case '@call': return runFunction(statement.subject, statement.object, null); } - } else { - // Reify object/arrays. - try { - var keys = _.keys(obj); - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - obj[key] = wax.Record(obj[key], context); - } - return obj; - // Unwrapped scalars - } catch(e) { - return obj; + } else if (typeof obj === 'object') { + var keys = _.keys(obj); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + obj[key] = wax.Record(obj[key], context); } + return obj; + } else { + return obj; } }; // Underscore.js 1.1.4 diff --git a/build/wax.g.min.js b/build/wax.g.min.js index d4c9aa7e..2b7a083d 100644 --- a/build/wax.g.min.js +++ b/build/wax.g.min.js @@ -7,4 +7,4 @@ * * This document is licensed as free software under the terms of the * MIT License: http://www.opensource.org/licenses/mit-license.php - */(function(a,b){function B(m){function P(a){!(M++)&&b(function(){N(),G&&a!=u&&(x[I]=a),f(m.error,m,[m,a]),f(B,m,[m,a])},0)}function O(a){!(M++)&&b(function(){N(),G&&(x[I]={s:[a]}),C&&(a=C.apply(m,[a])),f(m.success,m,[a,t]),f(B,m,[m,t])},0)}m=a.extend({},A,m);var B=m.complete,C=m.dataFilter,D=m.callbackParameter,E=m.callback,F=m.cache,G=m.pageCache,H=m.charset,I=m.url,J=m.data,K=m.timeout,L,M=0,N=c;m.abort=function(){!(M++)&&N()};if(f(m.beforeSend,m,[m])===!1||M)return m;I=I||j,J=J?typeof J=="string"?J:a.param(J,m.traditional):j,I+=J?g(I)+J:j,D&&(I+=g(I)+encodeURIComponent(D)+"=?"),!F&&!G&&(I+=g(I)+"_"+(new Date).getTime()+"="),I=I.replace(/=\?(&|$)/,"="+E+"$1"),G&&(L=x[I])?L.s?O(L.s[0]):P(L):b(function(f,g,j){if(!M){j=K>0&&b(function(){P(u)},K),N=function(){j&&clearTimeout(j),f[q]=f[n]=f[p]=f[o]=null,w[r](f),g&&w[r](g)},window[E]=d,f=a(s)[0],f.id=l+y++,H&&(f[i]=H);function m(a){(f[n]||c)(),a=z,z=undefined,a?O(a[0]):P(k)}v.msie?(f.event=n,f.htmlFor=f.id,f[q]=function(){/loaded|complete/.test(f.readyState)&&m()}):(f[o]=f[p]=m,v.opera?(g=a(s)[0]).text="jQuery('#"+f.id+"')[0]."+o+"()":f[h]=h),f.src=I,e(f),g&&e(g)}},0);return m}function g(a){return/\?/.test(a)?"&":"?"}function f(a,b,c){return a&&a.apply(b.context||b,c)}function e(a){w.insertBefore(a,w.firstChild)}function d(a){z=[a]}function c(){}var h="async",i="charset",j="",k="error",l="_jqjsp",m="on",n=m+"click",o=m+k,p=m+"load",q=m+"readystatechange",r="removeChild",s="