Skip to content

Commit

Permalink
Merge pull request #113 from Borzik/define-fix
Browse files Browse the repository at this point in the history
Fix “define is not defined” error when jquery-ui file is loaded
  • Loading branch information
joliss committed Dec 1, 2016
2 parents 19fb230 + bc78f09 commit 4595e51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
3 changes: 3 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ task :javascripts => :submodule do
mod.gsub!('/ui', '')
out.write("//= require #{mod}\n")
end
# core.js is deprecated and uses define function which is usually unavailable
# so we need only dependency loading there with no file contents
next if clean_path == 'jquery-ui/core.js'
out.write("\n") unless dep_modules.empty?
source_code = File.read(path)
source_code.gsub!('@VERSION', version)
Expand Down
22 changes: 0 additions & 22 deletions app/assets/javascripts/jquery-ui/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,3 @@
//= require jquery-ui/tabbable
//= require jquery-ui/unique-id
//= require jquery-ui/version

// This file is deprecated in 1.12.0 to be removed in 1.13
( function() {
define( [
"jquery",
"./data",
"./disable-selection",
"./focusable",
"./form",
"./ie",
"./keycode",
"./labels",
"./jquery-1-7",
"./plugin",
"./safe-active-element",
"./safe-blur",
"./scroll-parent",
"./tabbable",
"./unique-id",
"./version"
] );
} )();

0 comments on commit 4595e51

Please sign in to comment.