File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ goog.provide('jspb.ExtensionFieldInfo');
40
40
goog . provide ( 'jspb.Message' ) ;
41
41
42
42
goog . re
A483
quire ( 'goog.array' ) ;
43
- goog . require ( 'goog.asserts' ) ;
44
43
goog . require ( 'goog.crypt.base64' ) ;
45
44
goog . require ( 'jspb.BinaryReader' ) ;
46
45
goog . require ( 'jspb.Map' ) ;
@@ -1825,8 +1824,10 @@ jspb.Message.cloneMessage = function(msg) {
1825
1824
jspb . Message . copyInto = function ( fromMessage , toMessage ) {
1826
1825
goog . asserts . assertInstanceof ( fromMessage , jspb . Message ) ;
1827
1826
goog . asserts . assertInstanceof ( toMessage , jspb . Message ) ;
1828
- goog . asserts . assert ( fromMessage . constructor == toMessage . constructor ,
1829
- 'Copy source and target message should have the same type.' ) ;
1827
+
1828
+ if ( fromMessage . constructor !== toMessage . constructor )
1829
+ throw new Error ( 'Copy source and target message should have the same type.' ) ;
1830
+
1830
1831
var copyOfFrom = jspb . Message . clone ( fromMessage ) ;
1831
1832
1832
1833
var to = toMessage . toArray ( ) ;
You can’t perform that action at this time.
0 commit comments