gvas / knockout-jqueryui

Knockout bindings for the jQuery UI widgets.
http://gvas.github.com/knockout-jqueryui/
MIT License
103 stars 38 forks source link

Knockout Version 3.0.0rc #19

Closed wavedrop closed 10 years ago

wavedrop commented 10 years ago

Just a heads up.

I had an issue when using Knockout JS version 3.0.0rc. It seems that the "rc" causes the internal variable "versions.knockout" to be undefined. I fixed the issue by downloading KnockoutJS version 3.0.0 and that fixed the issue. Below is the code where I ran into the issue:

The error I received was " throw new Error('knockout must be loaded before knockout-jquery.');"

(function () {

    // dependency checks
    if (!versions.jQuery) {
        throw new Error('jQuery must be loaded before knockout-jquery.');
    }
    if (!versions.jQueryUI) {
        throw new Error('jQuery UI must be loaded before knockout-jquery.');
    }
    if (!versions.knockout) {
        throw new Error('knockout must be loaded before knockout-jquery.');
    }

    if (versions.jQueryUI !== '1.8' && versions.jQueryUI !== '1.9' && versions.jQueryUI !== '1.10') {
        throw new Error('This version of the jQuery UI library is not supported.');
    }

    if (versions.knockout !== '2.2' && versions.knockout !== '2.3' && versions.knockout !== '3.0') {
        throw new Error('This version of the knockout library is not supported.');
    }
}());
gvas commented 10 years ago

Fixed in v0.7.1, thanks!