Skip to content

Commit

Permalink
Update warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
bgando committed Aug 31, 2017
1 parent 292b1a5 commit 8b0fb11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion can-define.js
Expand Up @@ -230,7 +230,7 @@ define.property = function(objPrototype, prop, definition, dataInitializers, com

// If value is an object or array, give a warning
if (definition.value !== null && typeof definition.value === 'object') {
dev.warn("The value for options is set to an object. This will be shared by all instances of the DefineMap. Use a function that returns the object instead.");
dev.warn("can-define: The value for options is set to an object. This will be shared by all instances of the DefineMap. Use a function that returns the object instead.");
}
//!steal-remove-end
getInitialValue = Observation.ignore(make.get.defaultValue(prop, definition, typeConvert, eventsSetter));
Expand Down
2 changes: 1 addition & 1 deletion map/map-test.js
Expand Up @@ -843,7 +843,7 @@ if(System.env.indexOf("production") < 0) {
QUnit.expect(2);
var oldwarn = canDev.warn;
canDev.warn = function(mesg) {
QUnit.equal(mesg, "The value for options is set to an object. This will be shared by all instances of the DefineMap. Use a function that returns the object instead.", "Warning is expected message");
QUnit.equal(mesg, "can-define: The value for options is set to an object. This will be shared by all instances of the DefineMap. Use a function that returns the object instead.");
};
//should issue a warning
DefineMap.extend({
Expand Down

0 comments on commit 8b0fb11

Please sign in to comment.