From 4b43b1fbeba7d6551d6be72a9a34aa647a78c42d Mon Sep 17 00:00:00 2001 From: Ryunosuke SATO Date: Wed, 1 Apr 2015 12:44:51 +0900 Subject: [PATCH] Make version check for Ember.js strict When `Ember.VERSION` contains some version suffix (such as '1.11.0.72d2409e'), This check will reject this version of Ember unexpectedly. --- packages/ember-data/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ember-data/lib/main.js b/packages/ember-data/lib/main.js index b5a73ab9d15..5265ace5735 100644 --- a/packages/ember-data/lib/main.js +++ b/packages/ember-data/lib/main.js @@ -8,7 +8,7 @@ Ember.RSVP.Promise.cast = Ember.RSVP.Promise.cast || Ember.RSVP.resolve; Ember.runInDebug(function() { - if (Ember.VERSION.match(/1\.[0-7]\./)) { + if (Ember.VERSION.match(/^1\.[0-7]\./)) { throw new Ember.Error("Ember Data requires at least Ember 1.8.0, but you have " + Ember.VERSION + ". Please upgrade your version of Ember, then upgrade Ember Data");